Using dig
That’s one way
to< deal with
what’s
arguably a shortcoming in nslookup. Another is
just to chuck nslookup and use
dig, the Domain Information Groper (a
reverse-engineered acronym if we’ve ever heard one).
dig is a powerful DNS query tool that comes with
BIND. Unfortunately, it isn’t shipped with Windows
Server 2003, but you can get a version of dig
that runs on Windows NT, Windows 2000, and Windows Server 2003 from
ftp://ftp.isc.org/isc/bind/contrib/ntbind-8.4.1/BIND8.4.1Tools.zip.
You may also need to download the other DLLs available at
ftp://ftp.isc.org/isc/bind/contrib/ntbind-8.4.1.
Follow the installation instructions in the
readme1sttools.txt file and note the
Known Problems section of that file. It tells
you, for example, that on Windows 2000 and Windows Server 2003,
dig can’t read the resolver
configuration from the Registry, so it has no idea what name servers
to query by default. You’ll need to create the file
%SystemRoot%\system32\drivers\etc\resolv.conf
that contains at least one line specifying a name server
to query:
nameserver 4.2.2.2
Now, all this might seem like a lot of trouble when nslookup is already installed. But for our DNS troubleshooting purposes, we left nslookup in the dust years ago. We hope you’ll come to appreciate dig as much as we do.
With dig, you specify all aspects of the query you’d like to send on the command line; there’s no interactive mode. You specify the domain name you want to look up as an argument, and the type of query you ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access