pihole not renewing ip leases when they expire

Expected Behaviour:

when pihole DHCP is enabled and router DHCP is disabled, pihole will continue to use its programmed static IP and resume issuing IP addresses when they expire.

  • Operating System: Raspbian, updated as of 25/9. router firmware current as of ~20/9.
  • Hardware: RPi 3B+, netgear6080 (direct wired ethernet connection)
  • No docker

Actual Behaviour:

at midnight when leases expire, or if rebooted, the pi is completely unreachable. the only solution I have found is manually reissuing IPs from the router. other static IP devices continue to be able to reach the router, but cannot reach the pi.

I have gotten an error telling me to check my DHCP settings ("no addresses available to issue at x" I believe), but I intentionally set them almost identically to how they already were on the router so I'm not sure what specifically is wrong with them. I've tried a few different ranges without any effect.

Debug Token:

https://tricorder.pi-hole.net/MNRHoVkE/

It think there is a confusion here.

  1. the raspberry pi hosting pi-hole needs to have a static ip not a router dhcp assigned ip (pi-hole installer warns you about that).
  2. Leases expire when the lease time runs out (countdown starts when lease is assigned - not at midnight, unless by chance). That time is defined by the lease serving dhcp server.
    Not sure about your router’s default lease time, but at pi-hole level you can specify the lease time duration.

For what you need, set a fixed ip at os level on your raspberry. Reconfigure pi-hole. Enable pi-hole as dhcp server, disable router dhcp server. Once leases served by the router expire, pi-hole dhcp server will serve the leases going forward.

The "no address range available" message fits what RamSet said: dnsmasq logs it when the interface it listens on has no address inside the DHCP range. That happens exactly when the Pi was itself a DHCP client of the Netgear and loses its own address when that lease runs out, which matches the timing you see.

One trap when setting the static address: on current Raspberry Pi OS (Bookworm and later) networking is done by NetworkManager, so edits to /etc/dhcpcd.conf from older guides are ignored. Use nmcli instead, for example:

sudo nmcli con mod "Wired connection 1" ipv4.method manual ipv4.addresses 192.168.1.2/24 ipv4.gateway 192.168.1.1 ipv4.dns 127.0.0.1
sudo nmcli con up "Wired connection 1"

Adjust the addresses to your network, keep the Pi's address outside the DHCP range, and check with ip -4 addr show eth0 that it shows up without dynamic.

Thank you! I had set the static IP in the OS with nmtui but I had not updated it within the pihole itself and it was still trying to use dynamic.

I also want to clarify, the router we have sets all initial leases to end at ~midnight and to renew for 24 hour leases afterwards to minimize the potential for connection problems during peak use hours. It's not originally mine so I can't swear that that's firmware, but that's how I know it's happening at midnight daily (give or take a few minutes, might be 12:03).