Page 1 of 1

RPi private IP address has changed to public-what to do?

Posted: Sun Jul 31, 2016 12:42 pm
by alechk
Not at all sure what's happened. Was using a Pi3 to make a robot and it was behaving normally with me using ssh from another RPi to control it. It had a standard 192.168.1.* IP address until, today when I found myself unable to ssh to it. I attached it to a monitor and discovered its IP address had switched to a public one starting with 169

Has anyone experience this behaviour? Have I been hacked somehow or is it something to do with my broadband provider?

I'd be grateful for advice on how to deal with this or at least to understand how this happened.

Thanks in advance.

Re: RPi private IP address has changed to public-what to do

Posted: Sun Jul 31, 2016 12:57 pm
by DougieLawson
169.254.xxx.xxx/16 isn't a public address. It's the link-local address block that's assigned magically when your system can't reach an active DHCP server.

https://en.wikipedia.org/wiki/Link-local_address

Compare that to the non-routeable private network address blocks.

https://en.wikipedia.org/wiki/Private_network

Re: RPi private IP address has changed to public-what to do

Posted: Sun Jul 31, 2016 2:43 pm
by alechk
Thanks for the quick response. I didn't know about link local IP addresses so I can be relieved that I'm not being hacked!

None of my other RPi's have had this happen - up 'til now. Why is it that only one of my RPi's has been allocated this special address? What sort of events cause this? Is it possible to restore it to the previous IP address or something similar?

Sorry about the flood of questions! - and thanks for setting my mind at rest re hacking.

Re: RPi private IP address has changed to public-what to do

Posted: Sun Jul 31, 2016 2:50 pm
by DougieLawson
Your primary interface can't reach your DHCP server. If it's WiFi it's usually due to not having the right credentials. If it's eth0 it's usually due to the cable being disconnected.

If your home router/switch/DHCP server isn't configured right it may be due to no more addresses available in the DHCP pool.

Re: RPi private IP address has changed to public-what to do

Posted: Sun Jul 31, 2016 3:27 pm
by MrHW
This is sounding quite similar to a problem that I am experiencing (see my post on Using multiple network ports).

What version of Raspbian are you running (on all your various Raspberry Pis)? There has been some change in networking between what is in NOOBS 1.8.0 and 1.9.2

Re: RPi private IP address has changed to public-what to do

Posted: Sun Jul 31, 2016 6:26 pm
by alechk
I'll get back to you on that as soon asI can manage it. Hopefully by tomorrow .