nslookup, dig, and host when name server is down

Gilles Espinasse g.esp at free.fr
Sun Apr 12 07:25:30 UTC 2009


----- Original Message ----- 
From: "Ming-Ching Tiew" <mctiew at yahoo.com>
To: <busybox at busybox.net>
Sent: Sunday, April 12, 2009 9:02 AM
Subject: Re: nslookup, dig, and host when name server is down


> --- On Sun, 4/12/09, Gilles Espinasse <g.esp at free.fr> wrote:
>
...
> > > In any case, I also don't like the behaviour of /etc/resolv.conf,
> > > wheather glibc or uclibc. Assuming the fail server is the
> > > first entry, the whole world get slowed down because of that.
> > > How do people handle such problem ?
> > >
> > did you try dnsmasq?
> >
> > On first query, dnsmasq ask all dns servers the answer and
> > elect the fastest as the main server. This continue indefinetely.
> > If at one time, the dns server timed out in a query, a new
> > election is made.
> >
> > When all servers are down, dnsmasq still could resolve
> > names from resolv.conf
> >
>
> I do have dnsmasq running but perhaps my **CONFIGURATION** is
> bad, that's why I did not achieve my desired goal ?
>
> In my case, I need to serve the dns query from applications
> running within the machine which runs dnsmasq ( rather than
> internal LAN clients ). How do I direct these requests to
> dnsmasq ?  Do I specify localhost as one of the name server in
/etc/resolv.conf ? Won't it get into recursive since the
> dnsmasq itself maybe using /etc/resolv.conf too ?
>
> Regards
>
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

    Gilles



More information about the busybox mailing list