[TriLUG] dns lookup failure, rollover to lookup on secondary dns server

Aaron Joyner aaron at joyner.ws
Wed Feb 1 21:33:58 EST 2006


Wing D Lizard wrote:

>
> How can you tell if there is problems with the first name server
> and it rolls to the second/third one?  Is it logged?

Generally, no.  Every query is resolved independently, because the 
resolver libraries are compiled into everything that knows how to talk 
to a nameserver and, only with rare exception, programs don't keep state 
internally.  So if you ping www.joyner.ws, you'll open resolv.conf, try 
the first nameserver, wait 30 seconds for it to fail, then you'll try 
the second.  Control-c, run ping again (which makes it resolve the name 
again, it's a separate process from the first time you ran it, 
obviously), and it'll go through the same process again.  The big 
obvious thing is that stuff is really slow, and takes 30-45 seconds 
every time you look up a name.

> Is there a command use to test resolving through a specific
> name server?

Sure, any of the command-line DNS look up tools are capable of this.  
Try looking up www.joyner.ws against the name server 209.42.192.253, as 
follows:

host www.joyner.ws 209.42.192.253
dig www.joyner.ws @209.42.192.253
(or god forbid)
nslookup www.joyner.ws -server 209.42.192.253

Enjoy!
Aaron S. Joyner



More information about the TriLUG mailing list