DHCP server not visible on LAN, internet access lost

Expected Behaviour:

  • Turn off DHCP and IPv6 in router, turn on PiHole DHCP including DHCPv4 rapid commit and IPv6 options
  • Turn on a device that has an address in the reservation table
  • Device should boot up and connect to the network with its reserved IP address
  • All devices on the network should continue to access internet and each other

Actual Behaviour:

  • Device does not connect with the reserved address
  • Device acquires an address starting 169.254. etc.
  • sudo pihole-FTL dhcp-discover finds no DHCP server present on the network
  • No other devices acquire their correct IP address, all are in the 169.254 range
  • All internet access lost

Notes:

  • PiHole running on a basic Raspberry Pi Zero with ethernet adapter (no WiFi)
  • The Pi Zero has a reserved address in the router table, and the same address in the PiHole table (the two tables map all the same MAC addresses to IP addresses - PiHole table visible in the debug log)
  • Vodafone UltraHub router set to use PiHole DNS - has run correctly for some years with PiHole blocking ads
  • Now I want to move DHCP to PiHole (so I don't have to buy a new router, for reasons not relevant here)

Debug Token:

  1. https://tricorder.pi-hole.net/bpxb3CFN/ (Pi-Hole DHCP active but not working, router DHCP off)
  2. https://tricorder.pi-hole.net/tqu0phdP/ (Router DHCP working as normal)

Am I missing something basic? I don't have much experience with this sort of thing so I would not necessarily realise there was something obvious to a practiced eye.
Any help will be most welcome. Thanks

Your debug log warns that you have configured a public address DHCP range, starting at 19.168.1.75:

*** [ DIAGNOSING ]: contents of /var/log/pihole

  [2024-04-18 16:10:52] WARNING in dnsmasq core: DHCP range 19.168.1.75 -- 192.168.1.254 is not consistent with netmask 255.255.255.0
 *** [ DIAGNOSING ]: Setup variables
   DHCP_START=19.168.1.75
   DHCP_END=192.168.1.254

I guess you intended that to be 192.168.1.75 instead.
You should change that via Pi-hole's UI.


Unrelated to your issue, there is also a warning that your long term database has been corrupted:

  [2024-04-18 16:10:15] SQLite3 message: database corruption at line 70893 of [831d0fb283] (11)
(...)
  [2024-04-18 16:10:15] WARN: Database /etc/pihole/pihole-FTL.db is damaged and cannot be used.

You should stop your pihole-FTL service and move that file, e.g.

mv pihole-FTL.db pihole-FTL.corrupted.db

The older query history may still be recoverable in parts from the malformed database.

However, if you can do without that history, I would recommend to delete the malformed db altogether.
Above command is just moving it out of the way for the moment, allowing you to keep it until you've made your mind up.

A fresh (but empty) pihole-FTL.db will be created once you restart pihole-FTL, e.g. by pihole restartdns.

Thanks so much for your swift reply :smiley:
Damn - tripped up by a typo... I wonder how many times I checked over that and convinced myself the right numbers were there? :blush:
The Pi's DHCP server is up and running properly now.

Thanks too for the tip about the db file. I've followed your suggestion, but don't expect to have much use for the old data. We get lots of power cuts here so the computers often don't close gracefully - that could be the cause of a corrupted file.

Many thanks again

1 Like