nslookup, dig, and host when name server is down
Gilles Espinasse
g.esp at free.fr
Mon Apr 13 00:00:19 UTC 2009
----- Original Message -----
From: "Denys Vlasenko" <vda.linux at googlemail.com>
To: <busybox at busybox.net>
Cc: "Gilles Espinasse" <g.esp at free.fr>; "Ming-Ching Tiew" <mctiew at yahoo.com>
Sent: Monday, April 13, 2009 1:18 AM
Subject: Re: nslookup, dig, and host when name server is down
> On Monday 13 April 2009 00:34, Gilles Espinasse wrote:
> > > Sound like the behaviour I need is not achievable with dnsmasq too.
> > >
> > > My desired behaviour is this: Cache whatever successful queries.
> > > When clients make queries, reply with cache entry if there is one,
> > > but asynchronously make an attempt to query upstream. If successful,
> > > update cache. If fail, do nothing.
> > >
> > dont try to re-invent what exist
> > dnsmasq should work for your need
>
> Does it keep cached data (and for how long) when no DNS server answers.
> >
The no dns server case does not matter so much to me.
I haven't tested that. Basically my dns server is on internet and when I
don't have dns server, that mean my link to internet is broken.
I suppose dnsmasq could still answer from cache until ttl expiration but I
haven't tested.
I will speak for IPCop usage of dnsmasq.
When internet link goes down (that's where 99% of the dns servers are on an
ipcop configuration), we kill dnsmasq and restart a new one.
So for sure, you don't even have an answer coming from cache and nobody
complain.
dnsmasq drop root right after start and can't access everything as during
start.
With SIGHUP, dnsmasq could read again /etc/host, /etc/ether, possibly
/etc/resolv.conf with --no-poll option but is not able to read again his
configuration file.
This is what show killall -SIGUSR1 dnsmasq (to make stat appear)
dnsmasq[332]: time 1239579084
dnsmasq[332]: cache size 150, 6747/186694 cache insertions re-used unexpired
cache entries.
dnsmasq[332]: queries forwarded 58158, queries answered locally 15069
dnsmasq[332]: server 212.27.54.252#53: queries sent 34070, retried or failed
105
dnsmasq[332]: server 212.27.53.252#53: queries sent 24360, retried or failed
50
uptime is 43 days.
Probably the defaut cache size of 150 could be set higher on that machine.
Maximum hard limit is 10000 names.
Gilles
More information about the busybox
mailing list