Unable to access internet after restarting router

The issue I am facing:

  • After my router automatically rebooted this morning at 03:00 AM, all devices on my network were no longer able to access any external sites.
  • I could not access my router's webpage at 192.168.0.1 from any device on the network.
  • I could access other devices on my network by their hostnames.
  • All devices on my network were getting IP addresses of 169.x.x.x, indicating that they could not contact the DHCP server.
  • FTL.log was getting flooded with these messages every second:
    WARNING in dnsmasq core: DHCP packet received on enxb827eb5bbecc which has no address
    WARNING in dnsmasq core: no address range available for DHCP request via enxb827eb5bbecc
  • pihole.log was getting flooded with this message every second:
    dnsmasq-dhcp[380]: no address range available for DHCP request via enxb827eb5bbecc
  • I was able to temporarily fix the issue by connecting to my router's webpage using a VPN I had set up on the router, which allowed me to enable the DHCP server on the router and disable it on the Pi-hole.

Details about my system:

  • Pi-hole was configured as both the DNS and DHCP server at the time.
  • Pi-hole is running on a very old Raspberry Pi Model B Rev 2.
  • The debug log I generated says that dhcp-range=192.168.0.1,192.168.0.251,24h, but that's after I changed it to try and fix the issue. This was dhcp-range=192.168.0.100,192.168.0.251,24h at the time of the issue.
  • Router is behind an AT&T modem with IP passthrough enabled, set to pass to the router by its MAC address.
  • Pi-hole is connected to the router via ethernet cable.
  • Router IP: 192.168.0.1
  • Pi-hole IP (reserved in DHCP): 192.168.0.10

What I have changed since installing Pi-hole:

  • Enabled DHCP server on my Pi-hole and disabled it on my router.
  • Standard adlist and client setup.

Help requested:

  • I'd like to re-enable the DHCP server on the Pi-hole, but I want to ensure that I won't lose my connection again after another router reboot. I probably messed up something when configuring the DHCP server. What can I check to ensure that I have DHCP set up properly on Pi-hole?

Debug log token: https://tricorder.pi-hole.net/PsNbWrWL/

A DHCP server can't assign an IP to itself.
Consequently, your machine hosting Pi-hole and its DHCP server lacks a proper private IP, sporting an LLA instead (as you are already aware of):

*** [ DIAGNOSING ]: Network interfaces and addresses
   2: enxb827eb5bbecc: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
       inet 169.254.41.234/16 brd 169.254.255.255 scope global noprefixroute enxb827eb5bbecc
          valid_lft forever preferred_lft forever

Since you use your Pi-hole machine as DHCP server, you'd have to define a static IP for your Pi-hole on device.

For recent Raspberry Pi OS 11 (Bullseye), as reported in your debug log, that can be done by editing /etc/dhcpcd.conf (or by configuring NetworkManager, if you opted to use that instead of dhcpcd via raspi-config).

If I'm reading the documentation for dhcpcd.conf correctly, I would just need to add these lines to the end of the file, correct? Should I use eth0 or enxb827eb5bbecc? Do I need to set domain_name_servers to the address of the Pi-Hole device?

interface eth0
        static ip_address=192.168.0.10/24
        static routers=192.168.0.1
        static domain_name_servers=

We'd usually recommend to set domain_name_servers to Pi-hole plus a public DNS resolver (e.g. 127.0.0.1 9.9.9.9) or a public DNS resolver only (if you don't need to filter your host, which is likely the case for a server), so your host still has DNS resolution even if Pi-hole would be inoperational for reasons, allowing pihole commands to try a repair on it.

The most important part is the router gateway.
You want to make sure it matches your router's IP.

Thank you! I'll try out this configuration and make sure I've got it set up right.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.