Is it possible to have 2x DHCP servers with Pi-Hole + Gravity Sync?

My home network currently has 2 Pi-holes, with my primary currently configured as DHCP server. Is it OK to set up my secondary as DHCP server as well with the same range, as I'm using DHCP reservation for things like my printers.

A lot of the ones I've read said that the ranges for both DHCP servers should be different. I'm just wondering if Gravity Sync can alleviate that issue?

1 Like

This would be a question for Gravity Sync.

As that is a third party add-on, enquiries should be filed through them.
Their repository is at GitHub - vmstan/gravity-sync: 💫 The easy way to synchronize the DNS configuration of two Pi-hole 5.x instances..

As a general advice, you could run two DHCP servers on the same link, as long as their IP address pools for dynamically allocated IPs do not overlap, and you should make sure that your static IP address allocations (aka DHCP lease reservations) would be identical and outside of both your DHCP server's IP address pool ranges.

You should also note that only the DHCP server handing out the current DHCP lease would be aware of a client's hostname as presented by the client during DHCP lease negotiation.

2 Likes

My 2 piholes have DHCP pools with none overlapping ranges from the same network. On the second pihole that I was adding a DHCP server to, I added 'dhcp-reply-delay=2' in a file I created '/etc/dnsmasq.d/99-my-settings.conf' This results in my former dhcp server responding to all requests. My new dhcp server responds after a 2 second delay so clients should only accept that offer from this server if the former server was down.