Your router’s built-in DHCP server is a surprisingly easy thing to replace with Pi-hole, and doing so gives you much finer control over your network’s IP address assignments and, more importantly, your DNS resolution.

Let’s see it in action. Imagine a new device, say a smart TV, joins your network. It broadcasts a DHCP Discover. Pi-hole, configured as your DHCP server, hears this. It checks its lease table: no existing IP for this MAC address. So, Pi-hole assigns the next available IP from its configured pool, say 192.168.1.150, along with the subnet mask (255.255.255.0), gateway (192.168.1.1), and crucially, itself (192.168.1.10) as the DNS server. The TV gets its IP and immediately starts asking Pi-hole for DNS lookups for netflix.com. Pi-hole, in turn, checks its blocklists. If netflix.com isn’t blocked, Pi-hole forwards the request to its configured upstream DNS server (like Cloudflare or Google) and returns the IP address to the TV. If netflix.com were on a blocklist, Pi-hole would simply return a blackhole IP, preventing the TV from ever reaching Netflix’s servers.

The core problem Pi-hole’s DHCP server solves is the lack of granular control over DNS servers handed out by typical consumer routers. Most routers only allow you to specify one or two upstream DNS servers that they use, and they force clients to use the router itself as the DNS forwarder. This means your router is the bottleneck and the gatekeeper for all DNS queries. By making Pi-hole the DHCP server, you dictate exactly which DNS server (Pi-hole itself) your devices receive. This allows Pi-hole to intercept every DNS query from every device on your network, enabling network-wide ad blocking and DNS-based filtering.

To enable Pi-hole’s DHCP server, you first need to disable DHCP on your router. This is critical to avoid IP address conflicts. Log into your router’s web interface (usually something like 192.168.1.1 or 192.168.0.1) and find the DHCP server settings. Look for an option to disable it. Once disabled, navigate to your Pi-hole’s web interface. Go to Settings -> DHCP and check the box for "Enable DHCP server".

Next, you’ll configure the DHCP range. This is the pool of IP addresses Pi-hole will hand out. For example, you might set:

  • DHCPv4 Start IP address: 192.168.1.100
  • DHCPv4 End IP address: 192.168.1.200 This means Pi-hole will assign IPs from 192.168.1.100 up to 192.168.1.200.

You also need to specify the router (gateway) IP address and the DNS server Pi-hole will provide.

  • Router (Gateway) IP address: 192.168.1.1 (This should be the IP address of your router, which is now acting only as a gateway and access point, not a DHCP server).
  • DNS Server 1: 192.168.1.10 (This is the IP address of your Pi-hole itself. Ensure your Pi-hole has a static IP address on your network for this to work reliably. You can set this static IP in your router’s DHCP reservation settings before disabling your router’s DHCP, or by configuring a static IP directly on the Pi-hole’s operating system.)

Once saved, devices that connect to your network will get their IP addresses from Pi-hole, and importantly, they will be configured to use Pi-hole as their DNS server. You’ll see new devices appear in the Pi-hole dashboard’s "Network" table as they lease IP addresses.

A common point of confusion is how to ensure your Pi-hole itself always has the same IP address. If your Pi-hole’s IP changes, devices will no longer be able to reach it for DNS. The most robust way to handle this is to assign a static IP address to your Pi-hole outside of the DHCP range you’ve just configured in Pi-hole. You can do this either by setting a DHCP reservation on your router (if you still have access to its DHCP reservation settings while its DHCP server is off) pointing your Pi-hole’s MAC address to a specific IP, or by configuring a static IP directly within the operating system running Pi-hole (e.g., via /etc/dhcpcd.conf on Raspberry Pi OS). For instance, if your Pi-hole’s MAC address is B8:27:EB:XX:XX:XX and you want it to have the IP 192.168.1.10, you’d configure this static IP on the Pi-hole itself, ensuring it’s outside the 192.168.1.100-200 range.

You might also wonder about IPv6. Pi-hole’s DHCP server also supports IPv6. If your network uses IPv6, you’ll need to configure an IPv6 DHCP range and specify an IPv6 DNS server (which will also be your Pi-hole’s IPv6 address).

The next step in enhancing your network’s DNS control is understanding how to configure custom DNS records within Pi-hole.

Want structured learning?

Take the full Pihole course →