[Dnsmasq-discuss] DNS cache for DHCP addresses
simon at thekelleys.org.uk
Thu Sep 15 07:39:57 BST 2005
> Great work on dnsmasq, btw. Is it possible to get it to check the DHCP
> clients' IPs when asked for a DNS lookup before passing it upstream? For
> example, if I have DHCP clients 'lister' and 'rimmer' connected to server
> 'kryten', if I run "host lister" on 'rimmer' at the moment I get an NXDOMAIN,
> whereas I'd like to get lister's IP.
> If it's not possible to do this at the moment, I'll have a look at the source
> and see if I can set up a method.
That's pretty much the whole point of integrating the DHCP and DNS
servers! You need to tell the DHCP system what the names of the hosts
are; broadly there are two alternative ways to do this.
1) Have the DHCP client send the hostname when it gets a lease. This
happpens automatically on Windows and Mac clients. Different Linux
clients need different configuration options, so you need to check the
2) Associate a hostname with a MAC address in the dnsmasq configuration.
The easiest way to do that is to set "read-ethers" in /etc/dnsmasq.conf
and put the mac-address/hostname pairs in /etc/ethers.
It's worth checking the FAQ too.
More information about the Dnsmasq-discuss