I’ve just spent half the day trying to fix the address of one of my Raspberry Pis. No matter what I did, it kept the address that it was assigned some time ago.
I even tied the IP address to MAC in the router – and THAT didn’t help. Countless resets of the router and the board got me nowhere until I read this:
http://raspberrypi.stackexchange.com/questions/37916/setting-up-static-ip-address-on-raspian-jessie
My /etc/network/interfaces file didn’t look like that so I updated it… turns out in Jessie you have to update the file /etc/dhcpcd.conf
Here’s mine..
interface eth0
static ip_address=192.168.0.20/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
Even getting this far, some tutorials said you needed far more information than this or the Pi would not be able to contact the outside world. Well, mine does now and the address fixing works. Worth keeping that link in your bookmarks.
Slightly off topic, but If you want a really clever router / firewall, take a look at pfSense (www.pfsense.org).
I have it running on a low cost twin network port Celeron 1037u box i got from AliExpress that consumes approx 15w and it has incredible functionality, knocking spots off of any commercial plastic box offering from the likes of Netgear / TPlink etc. There’s a very good user forum that is helpful if you have questions.
As I understand it,
– Address reservation is part of DHCP
http://www.tp-link.com/en/faq-182.html
– IP to MAC binding is part of ARP (Its likely you don’t use DHCP here in your router)
http://www.tp-link.us/faq-170.html
These links give some good info about the 2
https://community.spiceworks.com/topic/491653-arp-vs-dhcp-reservation
http://superuser.com/questions/904476/what-is-the-difference-between-arp-binding-and-dhcp-address-reservation
https://en.wikipedia.org/wiki/Address_Resolution_Protocol
Thanks for that…
That’s odd. On my Pi (which is running a standard Jessie) I’ve never had to mess with that DHCP file. I simply add the following to the end of my /etc/network/interfaces file:
iface eth0 inet static
address 192.168.1.x
netmask 255.255.255.0
gateway 192.168.1.1
HI Pete,
I think you will find its a different name for the same thing. Some call it Mac Binding, Some Reserved Space, Other Fixed IP etc.
Regards
Paul
Yes but my router has both!
For any anything that is not a R.Pi2, I set the IP address in the router, but for R.PI2, I always set the IP in the R.PI2 itself. This is because I have more than R.pi2 and quite a few card images (thingbox / Jessie etc). It just makes it easier for me to track what is which – because it is the card image that sets the IP and not the physical device of the R.Pi2.
For the way I fix IP addresses(right click top right and set for eth0), Jessie seems to act the same as Wheezy. However whenever, I want to use a different memory card in my R.Pi2, I do have to disconnect and reconnect the network cable for any IP changes to really take “root” in the router 🙂
Interestingly, I’ve used a tp-link extender in the past and when it finally works, its great! But, I did find the tp-link didn’t like regular IP address changes over wifi(!) – just wanted to ignore things and hang.
I know it doesn’t really answer the question, but hope it helps someone
I just got a reply from TP-Link – telling me I need to use “address reservation”…. seems to me that IP to MAC binding is the right solution – I’ve asked TP-Link the question but if anyone in here knows the difference do tell…
Hi Pete,
Is this peculiar to Raspian Jessie ? I run Jessie on a virtual server and I get the router to set its ip address from the mac. Looking at my config I don’t have an /etc/dhcpd.conf which is as I would expect because it’s not a dhcp server. In the /etc/network/interfaces I set the interface to dhcp (iface eth0 inet dhcp). I haven’t used my pi for quite a while so maybe it’s a “feature” of the Raspian Jessie version.
Toby.
I had to reboot the draytek as the mac was already in the dhcp pool.
P.
Thanks Pete,
I gave up with this and forced the draytek to do it. But I’ll bear this in mind for future use.
Regards Paul
I would MUCH rather the router do it – but it totally ignored me! (TPLINK)
Hi Pete,
I assume you did set the pi back to dhcp mode. You would also need to clear down the dhcp pool in the router to force it to use the bind to mac.
Regards
Paul
TP-LINK – could not find that setting – I’ve written off to them as clearly doing in the router would be much better.
I had a similar problem with Rpi2 (Jessie).
My previous router was quite bad at synching up changed IP addresses.
e.g. when the IP address for the ETH0 network was changed via the top right option.
However with my new ASUS router, all I have to do is disconnect and reconnect the network cable and it all seems to work!
cheers