3 ms·
It depends on how your nslookup application is configured. They can be configured to go straight to DNS and not use any local host resolution, that’s true. And
by bradknowles 5y ago
It depends on how your nslookup application is configured. They can be configured to go straight to DNS and not use any local host resolution, that’s true. And in that case, I consider it to be marginally useful — at least it generates less noise than dig. However, by default on most platforms, nslookup is specifically configured to use /etc/hosts (or the equivalent) or other local lookup facilities (like NIS) before using DNS. That’s the real reason you use nslookup, to see what those other local name resolution facilities might tell you that are not represented in the DNS.
- teddyh 5y ago> However, by default on most platforms, nslookup is specifically configured to use /etc/hosts (or the equivalent) or other local lookup facilities (like NIS) before using DNS. I can find no reference to this, nor does nslookup do that on my system. Maybe on Windows, its “nslookup” (which is not the real Unix nslookup) command does this?
- bradknowles 5y agoSee https://en.wikipedia.org/wiki/Nslookup https://en.wikipedia.org/wiki/Nslookup In particular, note the following quote: “Unlike dig, nslookup does not use the operating system's local Domain Name System resolver library to perform its queries, and thus may behave differently. Additionally, vendor-provided versions may include output of other sources of name information, such as host files, and Network Information Service. Some behaviors of nslookup may be modified by the contents of resolv.conf.[2]”