Apolgies if this is a dumb questions, I've searched around the web and can't find an answer which usually means the answer is obvious or it's a dumb question so apologies up front. I've installed PIHole and forced my laptop to use it as the DNS server. All looks good. I couldn't see the ability to define static ip addresses based on hardware address.
My question is how do I incorporate PiHole into my current LAN set up which includes dnsmasq?
Do I ;
a) drop dnsmasq completely
b) dnsmasq passes traffic to pihole
c) pihole passes traffic to dnsmasq
Details about my system:
In my current setup dnsmasq is the dns server and provides dhcp and provides static ip address and host names for certain devices based on hardware addresses. e.g.
dhcp-host=b8:88:a9:ee:24:fa,Wifipi,192.168.1.252
If you decide to keep your existing dnsmasq, have it distribute your Pi-hole's IP address as the sole DNS server via DHCP, and configure Pi-hole to use your dnsmasq instance as its sole upstream.
That way, your clients would send their queries to Pi-hole, so you'd be able to associate queries to individual clients.
This is only guaranteed to work if you host dnsmasq and Pi-hole on separate machines, lest they compete for control over port 53 as well as configuration options.
If you decide to replace your existing dnsmasq with Pi-hole, you will be happy to learn that Pi-hole makes use of its own embedded version of dnsmasq tailored to its specific needs.
This means you could install Pi-hole on a different machine and copy your existing dnsmasq configuration to /etc/dnsmasq.d/.
You'd have to be careful to eliminate possible conflicts with configuration options controlled by Pi-hole itself.
Pi-hole will store these in 01-pihole.conf - general configuration, always present 02-pihole-dhcp.conf - DHCP options, only present if Pi-hole is set as DHCP server 04-pihole-static-dhcp.conf - definitions for DHCP lease reservations, again only present if Pi-hole is set as DHCP server
If your own configuration for your clients is pretty advanced, the latter one will be the most likely source of conflict.
In that case, my advice would be to stay clear of using Pi-hole's UI to manage static IPs - stick with your files instead.
Note that Pi-hole may and will overwite its own files on UI interaction and/or any manual updates of Pi-hole (but not during weekly updates of blocklists), while anything else will stay untouched. It's a good idea to keep vital things in a separate configuration file.
Pi-hole is based on dnsmasq, and if there is no compelling reason to have a separate dnsmasq instance running, you can have Pi-hole assume all the existing dnsmasq functions and eliminate the other instance. Any existing dnsmasq configuration files will work with pihole-FTL. You would put them in new files in /etc/dnsmasq.d on the Pi.