1

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.

2

You tried to use /etc/dhcpd.conf. It may be a typo, but have you checked /etc/dhcpcd.conf (different from the one you mentioned)?

If you have a static ip configured there this might explain what's happening here.

| improve this answer | |
  • OH. MY. GOD! I can't believe it. I kept making the same typo for 2 hours, even though I was later correctly using dhcpcd with sudo to see if I get sending commands to master dhcpcd process as a response. I had given up and was going to resort to reflashing the Pi over the weekend!! Thank you so much. And yes, there was a static IP configured there! – Rushabh Vora May 27 at 9:11
  • What typo do you mean? – Ingo May 27 at 10:14
  • @Ingo if you see my OP, I use trying to access/create /etc/dhcpd.conf instead of /etc/dhcpcd.conf. Missed a single letter, c. – Rushabh Vora May 27 at 10:45
  • I meant "was trying to access" above, not "use trying to". – Rushabh Vora May 27 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.