static ip is not working properly

Hiiii guys. 

I am working with Nano Pi M1. I want to set static ip to the Pi. But when I
am setting it, Pi is being connected with 2 ips. dynamic ip and static ip.
When checking ifocnfig it is showing static ip but when i am pinging and
opening with ssh it is working for both ips. And after few hours of time
static ip is disappearing with an error showing 

eth0: must be stopped to change its MTU 

and dynamic ip is displaying in ifconfig. So I want to know how can I
maintain only static IP to my Nano Pi even though it was connected to DHCP

Are you running Debian Jessie on the M1?

I have noticed that:

   hostname -I


The first is my static IP found in /etc/network/interfaces for wlan0.  The
second ... I don't know where it came from.

Like you I could ping the target at both IPs.  Before I did that the target
could not ping my router.  After I could ping the router.

At one stage the disappeared, but has re-appeared.

Maybe showing your interfaces file might help someone explain to the both
of us what is going on.

If you are running Jessie then a search of the Raspberry Pi forums might be
more helpful.

What does:

   arp -a 

say on your board?


Where he talks about editing /etc/dhcp/dhclient.conf and commenting out the

   request ...

Check out the other suggestions.

Ah, what about:

   route -n

For me there are two lines with the same router gateway address, except
Metric for one is 0 and the other 303.

   route del default gw

got rid of the line with Metric 303 and now

   hostname -I

gives only one Gateway entry.

Still don't know how the spurious gateway entry got there.

Darn ... came back after a re-boot.

I know on the NanoPi there is a comment about having to remove a file
called /etc/udev/rules.d/70-persistent-net.rules ... I wonder if there is
some rules.d file that needs deleting or changing.

Good luck and report back.

Good night.

I am going to work through this tutorial:

I see he too modifies dhcpcd.conf "to statically assign a IP Address to our

Did it for me.  Just make sure the static IP address you have in
/etc/network/interfaces is in the range of IP addresses in dhcpcd.conf

Maybe use wpa_supplicant.conf like he does.


eMail (not visible)
Subject (no text only in upper case; no HELP, URGENT...)
HTML tags are not supported and links are generated automatically if they start with http or ftp.
Please submit long source code or log files as attachment (only registered users).
Please enter the number: 3 7 2 2