I have a Linksys router running DD-WRT (Firmware: DD-WRT v24-sp2 (09/08/09) mini). I have it successfully resolving the DNS names for my DHCP-assigned systems, but only when I fully-qualify those domains. This is despite using the "expand-hosts" DNSMasq additional option, which is supposed to activate this precise function.

Here's my dnsmasq.conf:

interface=br0
resolv-file=/tmp/resolv.dnsmasq
domain=example.com
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-lease-max=51
dhcp-option=lan,3,10.77.0.5
dhcp-authoritative
dhcp-range=lan,10.77.0.100,10.77.0.149,255.255.0.0,1440m
dhcp-host=00:1A:A0:1D:82:5A,astatichostname,10.77.1.40,infinite
expand-hosts

(FYI: example.com and astatichostname are placeholders for the real-deal names I use. My network uses 10.77.0.0/16; my router is on 10.77.0.5.)

Results:

> nslookup astatichostname 10.77.0.5
Server:     10.77.0.5
Address:    10.77.0.5#53

** server can't find astatichostname: NXDOMAIN

> nslookup astatichostname.example.com 10.77.0.5
Server:     10.77.0.5
Address:    10.77.0.5#53

Name:   astatichostname.example.com
Address: 10.77.1.40

Is there something else that could be tripping up expand-host in DNSMasq?

link|improve this question

62% accept rate
feedback

1 Answer

The following works for me on my DD-WRT:

expand-hosts
local=/lan/
domain=lan

I think it's because you're missing the local setting. I also have lan set as my "LAN Domain" in the GUI.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.