2

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 (/tmp/dnsmasq.conf):

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 = 4.2.2.3
server = 4.2.2.4
server = 4.2.2.1
server = 4.2.2.2

DNSMasq leases file (/tmp/dnsmasq.leases):

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 *

Ping/nslookup results:

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?

1 Answer 1

0

My client in question was an XBian Raspberry Pi, and a subsequent update after a few bugfixes seems to have solved the problem.

1
  • Another cycle where an update broke this functionality, and then restored this functionality with a subsequent update happened for me.
    – palswim
    Jul 27, 2015 at 22:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .