0

I have set up my Pi recently. I have found the local IP address for the device so that I can ssh to it. It is connected to the internet by an ethernet cable.

My question is: will this local IP address change at some point? If so, how can I get around this? I don't have a monitor / mouse / keyboard at home, and so I rely on being able to ssh into my Pi.

Do I need to set my Pi to have a static address? Does it remain static even though presumably, the IP of my building's internet will still change.

user1551817
  • 101
  • 1

1 Answers1

1

It is not very likely (but possible) that your pi's ip address will change, because the pi will always ask the dhcp server (most likely your router) for the same ip address. Ingo pointed out how that works: https://raspberrypi.stackexchange.com/a/92747/92303.

As Ingo clarified in the comments there may be also a link-local address for your pi provided by the dhcp server. (avahi only works if your computer is connected directly to your pi.)

To be sure, that your pi will always get the same ip address, the easiest way is to configure your router to always give it to it.

EDIT:

If all that doesn't work well for you, I would suggest configuring your dhcpcd like this: https://raspberrypi.stackexchange.com/a/43189/92303.

jake
  • 1,367
  • 1
  • 11
  • 23