:: Re: [DNG] dig vs nslookup: was Weir…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Rick Moen
Date:  
À: dng
Sujet: Re: [DNG] dig vs nslookup: was Weird network issue - slow to resolve IPs
Quoting Steve Litt (slitt@???):

> What's your opinion of nslookup as an alternative to dig? Not sure, but
> I think you need to install bind to get dig, and not everyone wants to
> install bind.


1. No, dig isn't bundled with BIND9 _in Linux distros_ (or in other
*ixes), all of which build it standalone from parts of the ISC BIND9
sources.

2. It's complicated. For quite a long time, nslookup was officially
deprecated because it gave provably wrong results in some use cases, and
because it relied on a chunk of very buggy spaghetti code carried
forward from the old BIND4 codebase. This was covered in, among other
places a Paul Vixie interview
(http://linuxmafia.com/faq/Network_Other/dig-nslookup.html). DJB had a
page about this (circa end of the 1990s) that I kept referring people
to: https://cr.yp.to/djbdns/nslookup.html

Then, in 2017, ISC suddenly removed the notations declaring that
nslookup was deprecated and that people should be learning to use dig
& host. Specifically, this was in the release notes for BIND 9.9.0a3:

  1700.   [func]      nslookup is no longer to be treated as deprecated.
                      Remove "deprecated" warning message.  Add man page.


I never got the full story about what exactly happened. Perhaps someone
at ISC found the time and interest to rewrite nslookup's internals to
fix its lingering problems. In any event, having moved on from nslookup
to dig about two decades ago, I seriously no longer care. Even back
then when it was a pain in the tochis to learn a repalcement networking
tool, I could see that 'dig' was a generally better, more flexible, more
functional tool with more script-parseable output, so I really don't
care if nslookup has been improved from unacceptable to tolerable.

To my knowledge, the main reason nslookup persists is that it, and not
dig/host, is bundled by default with MS-Windows. All other commonly
available OSes (and most particularly any *ix including OSX) long ago
replaced it with 'dig'.

For any MS-Windows-using friends, this page explains step-by-step how to
retrofit .EXE-binary copies of dig / host / whois:
https://www.mowasay.com/2017/10/r-i-p-nslookup-start-using-dig-or-host/