alechk
Posts: 17
Joined: Thu Aug 06, 2015 7:53 am

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

Sun Jul 31, 2016 12:42 pm

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.

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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

Sun Jul 31, 2016 12:57 pm

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
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

alechk
Posts: 17
Joined: Thu Aug 06, 2015 7:53 am

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

Sun Jul 31, 2016 2:43 pm

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.

User avatar
DougieLawson
Posts: 40833
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

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

Sun Jul 31, 2016 2:50 pm

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.
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

MrHW
Posts: 3
Joined: Fri Jul 29, 2016 4:52 pm

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

Sun Jul 31, 2016 3:27 pm

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

alechk
Posts: 17
Joined: Thu Aug 06, 2015 7:53 am

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

Sun Jul 31, 2016 6:26 pm

I'll get back to you on that as soon asI can manage it. Hopefully by tomorrow .

Return to “Networking and servers”