[Dnsmasq-discuss] Secondary DNS

Simon Kelley simon at thekelleys.org.uk
Wed Jan 24 17:18:37 GMT 2007


Davide Ferrari wrote:
> Another question...today is DNS/DHCP day here at work ;)
> How could I set another secondary DNS to be passed directly to DHCP clients 
> where this DNS is another machine in my local network (not an external one)?
> 

Be careful doing this: you can send more the one DNS server to your DHCP
clients, but their status as primary/secondary and the order in which
they are used is more a result of weak custom-and-practise than of any
standard.

In other words, the server you are sending as secondary may well be used
 even when the primary is working fine, and the secondary doesn't know
about the extra hosts that dnsmasq (as DNS server) adds. Those with
DHCP-allocated addresses, those in /etc/hosts, etc, etc.

So when the secondary is used some host will mysteriously fail to
resolve, and you're never quite sure when the secondary will be used.

Given that, the answer is (assuming your secondary is at 1.2.3.4)

dhcp-option=6,0.0.0.0,1.2.3.4

DHCP option 6 is the DNS servers, and this replaces the default option 6
with the the address of the host running dnsmasq (substituted for
0.0.0.0) and 1.2.3.4


HTH

Simon.




More information about the Dnsmasq-discuss mailing list