Enabling DHCP on Pihole breaks the network

Please follow the below template, it will help us to help you!

Expected Behaviour:

I have Pihole 6.x, updated to the latest, running on a Raspberry Pi. I recently performed a fresh install of the OS, Pihole, and Unbound on a new SD Card.
Imported the pihole configuration from the old install of Pihole using teleporter.
The old Pihole was the DHCP server and everything was working fine.
The new Pihole should work fine as the DHCP server

Actual Behaviour:

Once I disable DHCP server on the router and enable it on Pihole, the pihole IP is inaccessible, DNS stops working and I'm unable to access even the Pihole admin page.
Pings from my laptop to the RPI times out continuously until a few minutes after I turn off the DHCP server on the pihole:

PS C:\Users\AJ> ping -t 192.168.0.6

Pinging 192.168.0.6 with 32 bytes of data:
Reply from 192.168.0.10: Destination host unreachable.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Reply from 192.168.0.10: Destination host unreachable.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Debug Token:

Your debug token is: https://tricorder.pi-hole.net/bXK5CllX/

Your failure to ping by IP demonstrates that this is an OS level/networking issue rather than a Pi-hole one.

When you installed the new OS, how did you configure a static IP on device?

This is not continuous. Every few minutes (I've not really timed it), the Raspberry Pi is accessible via SSH. When this happens, the ping also gets a valid response.
Also, during this time, while I'm able to SSH to the RPi, the Pihole admin does not open up.
Also, the entire issue only starts when I enable DHCP on Pihole (and correspondingly, disable DHCP on my router). If the issue was OS Level or a networking issue, will the ping not timeout when I disable DHCP on the Pihole?

When you installed the new OS, how did you configure a static IP on device?

Using "nmtui" from the SSH terminal

Destination host unreachable is definitely a networking issue - neither DNS nor DHCP are involved when you ping an IP address.

Your router's leasetime would have an impact here. A device's interface that has acquired its lease via your router's DHCP server may hold on to its IP until its lease expires.

Failure to correctly configure a static IP on your Pi-hole would render Pi-hole's DHCP server inoperational once its DHCP lease expires, and consequently, your other devices would not be able to acquire a new DHCP lease when their current ones do expire.

Your debug log shows that youre RPi's eth0 did not carry an IP at times:

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

-rw-r----- 1 pihole pihole 199K Jul 25 12:15 /var/log/pihole/FTL.log
  -----head of FTL.log------
  2025-07-25 00:05:10.040 BST [5279M] 
  WARNING: dnsmasq: DHCP packet received on eth0 which has no address

That is strange, as that would not match the expected outcome of an expiring DHCP lease. That would just have your machine drop its IP, and on failing to acquire a new DHCP lease, assign itself an IPv4 LLA, i.e. it would not be reachable via its previous IP any more.

If your RPi's IP address goes on and off, it may mean that something on your RPi enables and disables network interfaces.

Im guessing here, but I think similar could happen if different network management tools on the RPi may fight over controlling an interface's configuration.
Did you perhaps engage in other tools like ifupdown or dhcpcd before you settled on nmtui for configuring a static IP?

You should check your RPi's network configuration.

nmcli device status
nmcli device show eth0 | grep IP4

EDIT: You may also scrutinise your system logs for NetworkManager messages related to eth0:

sudo journalctl --boot -u NetworkManager | grep eth0

Agreed. It is strange. But this behaviour only occurs when I turn on DHCP on the Pihole. No other changes at all for certain.

Your router's leasetime would have an impact here. A device's interface that has acquired its lease via your router's DHCP server may hold on to its IP until its lease expires.

The lease time on the router is 120 minutes. The connection goes down in less than 120 minutes

Your debug log shows that youre RPi's eth0 did not carry an IP at times:

Wow. I did not realize this. This might be a major contributor to the issue I'm facing. I know I'm harping on the same point but for the past 2 hours, since I switched back to the router DHCP, this issue has not occurred. I don't know if this is a red-herring but the timing and coincidence is suspicious to me.

Did you perhaps engage in other tools like ifupdown or dhcpcd before you settled on nmtui for configuring a static IP?
No. I only used nmtui. I setup the RPi OS normally using the imager app, turned on DHCP on the router, switched off the Pi, swapped the SD cards and booted the Pi. From the router, I fetched the dynamic IP that the router assigned to the Pi, SSHed to the Pi and then used nmtui to set a static IP.

>  nmcli device status
DEVICE  TYPE      STATE                   CONNECTION
eth0    ethernet  connected               Wired connection 1
lo      loopback  connected (externally)  lo
wlan0   wifi      unavailable             --

Looks fine to me

> nmcli device show eth0 | grep IP4
IP4.ADDRESS[1]:                 192.168.0.6/24
IP4.GATEWAY:                    192.168.0.1
IP4.ROUTE[1]:                   dst = 192.168.0.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]:                   dst = 0.0.0.0/0, nh = 192.168.0.1, mt = 100
IP4.DNS[1]:                     9.9.9.9
IP4.DNS[2]:                     149.112.112.112
IP4.DNS[3]:                     192.168.0.6

Here also everything looks fine (I've not yet set the primary DNS on the Pi to Pihole yet).

sudo journalctl --boot -u NetworkManager | grep eth0

Over an 8 minute period, there are lots of logs. The last few logs are:

Jul 25 12:07:48 raspberrypi NetworkManager[550]: <info>  [1753425468.9319] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 25 12:07:48 raspberrypi NetworkManager[550]: <info>  [1753425468.9338] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info>  [1753425513.7877] device (eth0): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <warn>  [1753425513.7906] device (eth0): Activation: failed for connection 'Wired connection 1'
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info>  [1753425513.7915] device (eth0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info>  [1753425513.8139] dhcp4 (eth0): canceled DHCP transaction
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info>  [1753425513.8140] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 25 12:08:33 raspberrypi NetworkManager[550]: <info>  [1753425513.8141] dhcp4 (eth0): state changed no lease
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8432] device (eth0): Activation: starting connection 'Wired connection 1' (c9ea9f2b-0cf2-312c-972d-e23ac07b239a)
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8436] device (eth0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8458] device (eth0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8480] device (eth0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8500] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds)
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8520] policy: set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8933] dhcp4 (eth0): state changed no lease
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.8994] dhcp4 (eth0): state changed new lease, address=192.168.0.6
Jul 25 12:13:33 raspberrypi NetworkManager[550]: <info>  [1753425813.9724] device (eth0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:34 raspberrypi NetworkManager[550]: <info>  [1753425814.0395] device (eth0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:34 raspberrypi NetworkManager[550]: <info>  [1753425814.0404] device (eth0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jul 25 12:13:34 raspberrypi NetworkManager[550]: <info>  [1753425814.0428] device (eth0): Activation: successful, device activated.

I'm don't know what these mean (I'm going to look into it). I'm including them here for posterity (and if you can see something from your experience :wink: )

I've figured this out. Removed the ethernet connection settings entirely (i.e. made it automatic again), rebooted, and then set it to manual/static IP again. This seems to have done the trick :man_shrugging:
Will close this ticket. Huge thanks to @bucking_horn for pointing out the root issue

The log lines show that for a period of several minutes, NetworkManager's DHCPv4 client was continuously trying to negotiate a lease from a DHCP server.
This could suggest that NM was configured to request a fixed IP via DHCP, instead of (or perhaps in addition to) assigning a static IP itself and just informing the DHCP server of that IP.

You probably want to monitor those NetworkManager logs for the next few days, just in case that behaviour would reoccur.

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