Chapter 5. Using Dig and nslookup

Dig is the best tool you can use, but most people use nslookup because it's available almost everywhere. Both of these tools, as is true for most of the other tools in the BIND distribution, do not use the OS resolver library. They use DNS only. If you set up your resolver in that way, Telnet, ping, and the other non-DNS tools will first look in /etc/hosts and then query DNS. Your resolver setup configures the way the C library call family gethostby* works. Telnet, ping, and most other software use these calls, but Dig, host, and nslookup do not. So, Dig and Telnet might see things differently depending on your resolver setup and the contents of /etc/hosts. This does have an upside, though. nslookup and Dig ...

Get Concise Guide to DNS and BIND, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.