cross-posted from: https://lazysoci.al/post/13315467

I have a Raspberry Pi 02W running Pi-Hole and ordinarily things work perfectly, but I’ve got something in my house tripping my fuse box which I’m unable to locate. The tripper, not the fuse box. Anyway, what it means is occasionally, I lose power and so my router and my Pi-Hole go down.

I’ve configured my /etc/dhcpcd.conf so that my RPi02W can have a static IP

interface wlan0
static ip_address=192.168.1.100/24
static routers=192.168.1.1
static domain_name_servers=194.168.4.100 194.168.8.100

And have rebooted to confirm it’s fine, and it’s fine.

However when the router goes down and I bring everything back up, the Pi-Hole can’t reconnect to the router. I can log in to the router and see it connect briefly, but it’s only briefly and then nothing. I even try enabling DHCP on the router and it still refuses to reconnect. Ultimately the only way to get it to reconnect is to factory reset the router, change the password back to my usual password, wait for the RPi02W to connect and then disable the DHCP again. Needless to say it’s a pain in the arse.

What am I doing wrong? How do I fix this?

#Solution I switched the DNS servers from Virgin Media to 8.8.8.8 and that seems to fix it. Not sure why, but it does.