0

The Pi boots up to the desired static ip(10.220.55.114), but after a day it changes to 10.220.51.116( a different subnet )

sudo vi /etc/dhcpcd.conf

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
interface wlan0
Static ip_address=10.220.55.114/24
static routers=10.220.55.254
static domain_name_servers=10.220.55.254

Not sure what files to look into or what to change to prevent the IP from changing.

jdl
  • 109
  • 2
  • 1
    Have you associated this static IP with the Pi's MAC address on the router? It's the ultimate arbitrator, and if you have not it may decide not to comply with the request (or, more likely, at some point there will be some confusion and the address will end up changing). – goldilocks Mar 25 '22 at 21:26
  • What Pi? What OS? What does ip a && ip r show? – Milliways Mar 25 '22 at 21:26
  • 2
  • 1
    You only show part of your dhcpcd.conf, your status IP address line has a capital letter, I would change that to lower case. Check for any interface fallback lines in the file too although I doubt this would be the issue given the name of this interface wlan0... No reason for it to change unless something else is invoking DHCP on the interface. Is this address inside the DHCP servers address range? – SEWTGIYWTKHNTDS Apr 01 '22 at 10:27
  • Make sure you are only using WiFi or wired ethernet. You could be getting different addresses for each interface. You can check which interface is getting which IP address with: ip a – moo Dec 27 '22 at 17:02

1 Answers1

0

check on your router, if there is a static IP for the Pi. As long as the router does not know that the Pi should have a static IP, the router can still change it. The static IP is assigned to a MAC address. So it is also possible that your Pi is in the list of static IPs in the router, but in the meantime has a different MAC address. In this case, the MAC address would simply have to be updated. If you use a service like Pi-Hole, or an external DHCP server, then of course you have to check if the DHCP server in your router is marked as such, because only then the router knows that it should leave the DHCP stuff to another server.

JJandke
  • 71
  • 6