I just recently had a router fail so I utilised an older router in its place. Failed router was giving out IP addresses from 192.168.1.2-192.168.1.254, and from that router I had reserved 192.168.1.254 for the Pi4, to have a fixed IP for Pihole. Currently running router gives out IPs in the range of 192.168.29.2-192.168.29.254.
For some reason, the eth0 interface keeps getting 192.168.1.254 as its IP. The wlan0 interface has correctly gotten a new IP. I checked etc/network/interfaces
, as well as /etc/dhcpd.conf
, both are empty/nonexistent. I tried running sudo mii-tool -r eth0
, that didn't help. I uninstalled pihole, rebooted the Pi multiple times, none helped.
I'm running it headless, and am able to SSH into it over the WiFi interface, which thankfully gets the correct IP. But I need it to work over ethernet, to prevent buffering since it's also a Plex server, serving high bitrate files for DirectPlay (4K Remuxes).
Other things I tried doing -
sudo dhcpcd -4 -S ip_address=192.168.29.254/24 \
-S routers=192.168.29.1 \
-S domain_name_servers=192.168.29.1 \
eth0
Above didn't work either.
I also tried giving it a static IP. That didn't work either, it still gets the old IP.
Any clue on how to force it to get a new IP, or why even setting a static IP is not working?
Edit - I ended up changing the router's LAN IP range to match the old one to get this to work.
Edit 2 - So the above made it possible to connect to the Pi using SSH via ethernet.. but the Pi has no internet connection.