How to make RPi with DietPi be visible on LAN again?

Hi everyone,

I’ve been using DietPi OS on RPi 3B+ for a couple of years now and had no issue. Recently, I switched internet provider and the old one had local IP range 192.168.1.x meanwhile the new one has 192.168.0.x

I have RPi connected over UTP cable, because I use it as DNS resolver with PiHole and find wifi to be unreliable.

I’m not sure what’s the problem, but ever since I connected RPi to a new modem, I don’t see it in modem’s list of connected LAN devices. I’ve tried different cables and tried different LAN ports. Other devices are connecting normally.

I’ve checked dietpi file and these are the settings:

AUTO_SETUP_NET_ETHERNET_ENABLED=1
AUTO_SETUP_NET_USESTATIC=0
AUTO_SETUP_NET_STATIC_IP=192.168.0.100
AUTO_SETUP_NET_STATIC_MASK=255.255.255.0
AUTO_SETUP_NET_STATIC_GATEWAY=192.168.0.1
AUTO_SETUP_NET_STATIC_DNS=9.9.9.9

but for some reason, RPi is not appearing on the clients list, hence I have no idea what’s its IP in order to connect or SSH into it.

I could flash a new image on SD card, but I would like to avoid that if possible, since I have everything set up on RPi.

Can someone tell me how to make it appear on the list and get the IP?

Can you connect to a monitor/keyboard? You may need to go into the dietpi-config settings, and make sure Network Options → Ethernet → Mode is set to DHCP, otherwise it won’t ask the gateway for an IP assignment.

2 Likes

I guess the network settings in dietpi.txt are loaded only on first boot:
##### DietPi-Automation settings, applied on first boot of DietPi only, ONCE! #####
So your SBC is still in the wrong subnet.
You can do what @BluishHumility suggested, or change the subnet in the new router to your old settings, so everything is like before?!

2 Likes

This is correct. AUTO_SETUP parameters are applied on first initial boot only.

Before changing the entire network to a new IP range, it might be easier to change the IP address of the router only.

If this is not possible, connect a screen and keyboard to be able to login locally to change the IP address.

1 Like

I’ve tried connecting it to a monitor and keyboard yesterday, but it wasn’t showing any picture on the screen, so I assumed something’s faulty and decided to try to change it headlessly, hence why I mentioned dietpi file.

Luckily, I tried again today and it showed the picture as soon as the power adapter was connected, so thank you all for your help!

1 Like