nslookup vs ping

Prev Next

AppGate SDP Support recommends the ping utility as the best cross-platform method for testing DNS resolution.

Alternately, AppGate SDP Support recommends attempting to access the utility normally (e.g., using a browser to access a web page or web-based application).

The nslookup utility does not use the operating system's local Domain Name System resolver library to perform its queries, and may behave in unexpected ways, so it is better to avoid using nslookup when testing DNS resolution.

On Windows, nslookup mostly does the same thing as a user application performing DNS lookup, but not entirely.  On Linux and MacOS, nslookup operates entirely differently.

The following is from the nslookup manual page for MacOS:

Mac OS X NOTICE

The nslookup command does not use the host name and address resolution or the DNS query routing mechanisms used by other processes running on Mac OS X.  The results of name or address queries printed by nslookup may differ from those found by other processes that use the Mac OSX native name and address resolution mechanisms.  The results of DNS queries may also differ from queries that use the Mac OS X DNS routing library.