TP-Link Routers and Pihole DHCP

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

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx, apache2 or another reverse proxy, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Attempt to use PiHole DHCP rather than router.

Expected to enable DHCP in PiHole, then disable DHCP in router. Upon reboot/DHCP renewal each device is assigned an IP address via PiHole DHCP automatically, with length and additional settings available via PiHole dashboard

  • Operating System (Family and Version)
    Raspberry Pi OS Lite - 64bit, 6.12 (bookworm)
    Core: 6.1.4, FTL: 6.2.3, WebInt: 6.2.1
  • Hardware
    Pi 4 B 4GB RAM
    TP-Link AX55 Router (stock)

Actual Behaviour:

Enable Pihole DHCP, disable router DHCP then reboot router/devices. Each device is unable to connect to either the inside, or outside networks via ping or hostname, and are assigned a 169 address. Setting IP and DNS manually within Windows does restore connectivity for that device, some devices on network are unable to do this.

Re-enabling DHCP in router seems to restore connectivity across the network, regardless of PiHoles DHCP server being enabled or disabled.

Extra
Having some trouble with PiHole grabbing hostnames via conditional forwarding, having PiHole as the DHCP server does replace the IP with the hostname, this also manages to track network usage for a full-tunnel VPN running on a server within the network, which doesn't seem possible if PiHole is responsible for DNS only. Having both the router and Pihole enabled as DHCP does seem to register some devices as assigned by PiHole with a static IP, I'm certain having x2 DHCP servers, even with static IP addresses is a bad idea?

TLDR: How to monitor a full tunnel VPN via PiHole, with hostname rather than IP?

Debug Token:

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

Which static IP address did you configure on the machine hosting your Pi-hole? How did you do that?

192.168.1.150 for the Pihole. IP was originally given to device within OS setup. The PiHole IP has also been reserved in both the Router and PiHole DHCP interfaces.

Happy to provide screenshots/logs/tables if it makes things easier.

Your router's DHCP assignments will expire once you disable its DHCP server, and a DHCP server can't hand out a lease to itself.

The assignment of IPv4 LLAs (range 169.254.0.0/16) once your router's DHCP server signs off is a strong indication that your Pi-hole machine may have lost its IP address, which in turn would suggest that the machine hosting your Pi-hole may not have a static IP configured.

How exactly did you configure that static IP?

Thanks for the reply.

The IP was assigned to the device itself during the initial boot of Pi OS, I think this was raspi-config.

I am not aware of a raspi-config version that would support setting a static IP on device. That has always been the job of dedicated network management tools.
Since Raspberry Pi OS 12, that would be NetworkManager, while dhcpcd has been used in earlier versions.

Raspberry PI OS documentation recommends to allocate a static IP via your router's DHCP server:

Assign a static IP address

To allocate a static IP address to your Raspberry Pi, reserve an address for it on your router. Your Raspberry Pi will continue to have its address allocated via DHCP, but will receive the same address each time. A "fixed" address can be allocated by associating the MAC address of your Raspberry Pi with a static IP address in your DHCP server.

However, that approach won't work if you want to run your RPi as a DHCP server itself - as explained, your router's DHCP assignments will expire once you disable its DHCP server, leaving your RPi without an IP.

Assuming you are on a recent RPi OS release, you'd have to set a static IP on your RPi via NetworkManager.
NM offers several ways of setting a static IP.
Its CLI tool nmtui probably is the most accessible one.

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