[Dnsmasq-discuss] newbie: How to make dnsmasq be authoritative

Simon Kelley simon at thekelleys.org.uk
Fri Dec 12 14:24:16 GMT 2008


Bernard T. Higonnet wrote:
> I have just set up dnsmasq and generally everything seems to be OK 
> (thanks to Simon Kelley).
> 
> But,
> 
> I have set dhcp-authoritative but when I dig an IP assigned by dnsmasq I 
> get this:
> 
> 
> ; <<>> DiG 9.4.2 <<>> Zazalight
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6981
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
> 
> ;; QUESTION SECTION:
> ;Zazalight.                     IN      A
> 
> ;; ANSWER SECTION:
> Zazalight.              0       IN      A       192.168.3.50
> 
> ;; Query time: 3 msec
> ;; SERVER: 192.168.3.108#53(192.168.3.108)
> ;; WHEN: Wed Dec 10 20:16:49 2008
> ;; MSG SIZE  rcvd: 43
> 
> 
> Apart from dhcp assigned IP's, I would have thought that dnsmasq would 
> consider itself authoritative (especially if (as is the case) dnsmasq is 
> indeed the only DNS server on the network)
> 
> 
> Here is my complete configuration file:
> 
> log-queries
> log-facility=/var/log/dnsmasq
> dhcp-authoritative
> expand-hosts
> bogus-priv
> domain-needed
> cache-size=500
> dhcp-host=00:16:d3:3b:4f:15,Zazalight,192.168.3.50,infinite
> dhcp-range=192.168.3.51,192.168.3.99,12h
> dhcp-option=option:router,192.168.3.1
> mx-target=freebsd.paristolet.com
> 
> 
> 
> TIA
> Bernard Higonnet
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

Dnsmasq does set the "Authoritative answer" bit in the DNS header for 
replies from /etc/hosts or DHCP. You can see it in the dig output above, 
"aa". It never provides data in the authority section, since it doesn't 
have the data to do so.

The --dhcp-authoritative flag is nothing to do with this: it doesn't 
affect DNS at all, but instead changes the behaviour on the DHCP server 
in subtle ways which make it work better when there is only one DHCP 
server on the subnet, but would break things if more than one DHCP 
server is available. The name is maybe confusing, but it's lifted from 
the ISC dhpcd, which has a similar, and similarly named, option.

Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list