I had a power outage the other day that knocked my home network offline and I couldn’t figure out how to fix it without resetting my router. I’ll try to replicate what I tried, but there’s always a challenge to debug a network without the network. This is the second time something similar has happened, so I want to figure out how to fix the issue or avoid it for next time.
Basic setup is using pihole as DNS and DHCP server as follows.
Setup:
-
Router Tp-link BE3600. DHCP: disabled, Address Reservation: raspi, 192.168.0.2
-
Raspi pihole, DHCP enabled, serving 192.168.0.10-254, ethernet to router
-
Both devices on a UPS, but I didn’t initiate shutdown, just flipped the switch once I got back up computer shut down.
Once power was restored I turned everything back on. The wifi network was visible but no devices could connect. I attached a monitor to the raspi, and was able to see that the pihole service was running, but the DHCP server had 0 clients.
Here’s as much of the debugging as I can remember/get from logs.
-
ip route show— no repsonse -
route– empty routing table -
ifconfig—
ether <some mac> txquelen 1000 (Ethernet)
RX packets 781 bytes 137456
RX errors 0 dropped 9 overruns 0 frame 0
TX packages 90 bytes 17075
lo: ...
I didn’t ping the gateway, I wish I had now, but it seemed like none of the computers knew where the gateway was. My hunch is something like this: during the outage something in the routing configuration got messed up, maybe the static route to the raspi, as a result none of the computers could reach the DHCP server on the raspi, and thus couldn’t find anything on the network.
Is there any way to debug this next time, or to avoid it altogether? I think this is a question about how default gateways work, and how I could re-establish the network without resetting the router.
Added after writing Two thoughts:
-
I might have been able to just add the default gateway route to the raspi, that might have been the entire issue: no gateway on raspi, no dhcp, gateway router can’t assign any pi addresses.
-
The Address Resolution is not the same as static ip, I assigned the address this way in the router with DHCP turned on, then toggled DHCP off. It worked until it didn’t
-
Those are actually the same issue.