I am running DNSMasq as both my DHCP and DNS server on my DD-WRT router. I had thought that DNSMasq was adding hosts that it registered in DHCP to the DNS server automatically, but I have a few machines on my network that the DNS server claims that it can't find. What else do I need to do?
DNSMasq config (
interface=br0 resolv-file=/tmp/resolv.dnsmasq all-servers domain=domain dhcp-leasefile=/tmp/dnsmasq.leases dhcp-lease-max=144 dhcp-option=lan,3,0.0.0.1 dhcp-authoritative dhcp-range=lan,0.0.0.100,0.0.0.200,255.255.0.0,1440m stop-dns-rebind dhcp-option= option:dns-server, 0.0.0.1 # DHCP option 006 server = 126.96.36.199 server = 188.8.131.52 server = 184.108.40.206 server = 220.127.116.11
DNSMasq leases file (
86400 00:00:00:00:00:01 0.0.0.101 host_fail * 86400 00:00:00:00:00:02 0.0.0.102 host_succeed *
root@dd-wrt:~# ping host_succeed PING host_succeed (0.0.0.102): 56 data bytes 64 bytes from 0.0.0.102: seq=0 ttl=64 time=2.138 ms 64 bytes from 0.0.0.102: seq=1 ttl=64 time=0.892 ms --- host_succeed ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 0.892/1.515/2.138 ms root@dd-wrt:~# ping host_fail root@dd-wrt:~# nslookup host_succeed Server: 0.0.0.1 Address 1: 0.0.0.1 dd-wrt.domain Name: host_succeed Address 1: 0.0.0.102 host_succeed root@dd-wrt:~# nslookup host_fail Server: 0.0.0.1 Address 1: 0.0.0.1 dd-wrt.domain root@dd-wrt:~# cat /etc/hosts 127.0.0.1 localhost 0.0.0.1 dd-wrt.domain root@dd-wrt:~# cat /etc/resolv.conf search isp.net search domain nameserver 0.0.0.1
What could differ between host_fail and host_succeed? I doubt it, but does anything need to change on the client side? Does nslookup transmit any data to the host itself (rather than the DNS only)?
I earlier had issues with my client not sending a host name, but I believe that the router and leases now confirm that my client is doing that correctly.
What do I need to change to ensure that DNSMasq can serve DNS requests for these hosts to which its given DHCP leases?