nslookup, dig, and host when name server is down

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 12 11:28:16 UTC 2009


On Sunday 12 April 2009 10:18, Ming-Ching Tiew wrote:
> > You should describe your configuration more accurately.
> > In /etc/resolv.conf, I have
> > nameserver 127.0.0.1
> > 
> > In /etc/host, there is name of the machines that are
> > resolved locally by
> > dnsmasq
> > 
> > I have a second resolv.conf file wich hold the name of the
> > real dns servers
> > nameserver xxx.xxx.xxx.xxx
> > nameserver xxx.xxx.xxx.xxx
> > 
> > and dnsmasq is basically started with
> > dnsmasq -r <path-to-the-2>/resolv.conf
> > 
> > In reality, there is too the domain name of the network
> > added on dnsmasq
> > command line.
> > So that's more
> > dnsmasq $DOMAIN -r <path-to-the-2>/resolv.conf
> > 
> 
> That seems to be what I need, I will give it a try. On second thought,
> it will be good if dnsmasq knows how to skip 'nameserver 127.0.0.1',
> then there is only one /etc/resolv.conf needed, ie dnsmasq
> is made to also use /etc/resolv.conf, and other applications
> on the same machine can use 127.0.0.1.    

It is not a correct design. /etc/resolv.conf should point to
DNS server all "normal" programs use, and in this case it should
be the address of them machine running dnsmasq, in your case 127.0.0.1
(in fact, in this case /etc/resolv.conf is optional, 127.0.0.1
is the default address if /etc/resolv.conf is missing.
But uclibc wasn't doing that correctly too).

dnsmasq, on the other hand, is not a "normal" program in this case.
It shouldn't try to use /etc/resolv.conf, but should have separate config.

--
vda


More information about the busybox mailing list