I use Pi-hole on my rpi3 to serve DHCP for multiple networks. I have these networks:
MGMT - vlan 1 - 192.168.0.0/24
LAN - vlan 10 - 192.168.1.0/24
GUEST - vlan 20 - 192.168.2.0/24
DMZ - vlan 30 - 192.168.3.0/24
DNS - vlan 40 - 192.168.4.0/24 (this is where Pi-hole is)
I have a DHCP relay agent on my router which forwards DHCP requests from VLANs 1, 10, 20, and 30 over to the Pi-hole in VLAN40. This works perfectly. I also have a /etc/dnsmasq.d/dnsmasq.conf file that has the relevant DHCP scopes and static DHCP leases defined. This works fine also.
What doesn’t work is any of the DHCP functionality in the Pi-hole GUI. I’d love to be able to tweak / configure the DHCP scopes and static leases from the GUI but there’s several things preventing me from doing so:
When enabling the DHCP server on Pi-hole (in general) it fails to specify the subnet mask. This causes dnsmasq to default to classful (class a, b, c) subnet masks. This breaks things, badly, because it gives out /16 subnet masks for 192.168.x.x addresses. This isn’t a problem for most small networks where there’s only one subnet, but it completely breaks when multiple vlans are in play. Pi-hole should, at the very least, default to a sane value (/24), and provide an option in the GUI to adjust this.
Pi-hole GUI only supports one DHCP scope. It’d be great to have an option to define multiple scopes, with different gateways.