The disgusting and useless nslookup

Chip Old fold at bcpl.net
Sat May 26 20:37:50 UTC 2001


On Sat, 26 May 2001, Jim Reid wrote:

>     Bob> That's the main reason that I use it -- in fact I always use
>     Bob> the vendor's copy so that things like nsswitch are accounted
>     Bob> for.  The other reason that I use it is laziness -- I'd
>     Bob> rather type ping bobv than ping bobv.dyn.atl.sbm.com
>
> This is one of the major reasons for *not* using nslookup. If nslookup
> is returning answers from other lookup mechanisms on the computer, how
> can you expect it to troubleshoot DNS problems? How can you tell which
> lookup facility the answer came from? What if that answer differs from
> what's in the DNS (which wasn't queried because nsswitch and friends
> say "look at /etc/hosts or NIS before going to the DNS")?

In the scenario Bob described, he is troubleshooting local resolver
issues, not DNS issues.  He needs to be able to see name resolution as the
local machine sees it, including whatever effect the local hosts file and
NIS may have.  In that scenario nslookup will verify that there is a
problem, then dig will tell you if the problem is in DNS.  If dig sees no
problem but nslookup does, then chances are good that it's a problem in
/etc/hosts or NIS.

You can argue (and I'd agree) that /etc/hosts and NIS are evils, and that
DNS is the only way to go.  However for a variety of reasons there are a
lot of sites out there where /etc/hosts, NIS, nsswitch and who knows what
other naming services continue to be used.  dig by itself isn't much use
to them because it works only with DNS.

-- 
Chip Old (Francis E. Old)               E-Mail:  fold at bcpl.net
Manager, BCPL Network Services          Voice:   410-887-6180
Manager, BCPL.NET Internet Services     FAX:     410-887-2091
320 York Road
Towson, Maryland 21204-5179 U.S.A.



More information about the bind-users mailing list