I've successfully installed DNSMasq on a Debian machine and everything seems to be working. Here's what I did:
install DNSMasq with
sudo apt-get install dnsmasq
/etc/dnsmasq.d/home.dnswith the following contents:
# General configuration domain-needed bogus-priv domain=dummy.home dhcp-range=192.168.0.10,static,48h dhcp-option=3,192.168.0.1 # Device IPs dhcp-host=00:00:5e:00:52:41,desktop,192.168.0.10 dhcp-host=00:00:5e:00:52:12,android,192.168.0.11
192.168.0.1 is my ISP router's IP.
- turn off DHCP on my ISP router
- restart DNSMasq service with
sudo service dnsmasq restart
That's all great, but I'm new to networking and have a bunch of questions:
how does DNSMasq communicate with the router? I mean, how does it tell the router that it should start using DNSMasq's DHCP server from that point on? Is there a specific protocol for that, whereby DNSMasq communicates with the router, or is it DHCP itself?
why didn't I have to configure my devices (an android phone and a desktop computer) to use DNSMasq's DNS server? [The answer to this one may be the same as from the question above, but anyways...]
is there a way of using DNSMasq for DNS only and have the router's DHCP server "talk to" or "use" DNSMasq's DNS server? This way I wouldn't need to turn the router's DHCP server off.
As I said, I'm a newbie, but I couldn't find answers to these questions anywhere on the web.