Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide

NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Read offline with no ads or diagram watermarks!
The TCP/IP Guide

Custom Search

Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP Administration and Troubleshooting Utilities and Protocols

Previous Topic/Section
TCP/IP Address Resolution Protocol Utility (arp)
Previous Page
Pages in Current Topic/Section
Next Page
TCP/IP DNS Registry Database Lookup Utility (whois/nicname)
Next Topic/Section

TCP/IP DNS Name Resolution and Information Lookup Utilities (nslookup, host and dig)
(Page 3 of 5)

Interactive Use of nslookup

The interactive mode of nslookup is selected by simply issuing the name of the command with no parameters. This will cause the program to display the current default name server’s DNS name and address, and then provide a prompt at which the administrator may enter commands. Interactive mode allows someone to perform multiple lookups easily without having to type “nslookup” each time. More importantly, it provides more convenient control over the types of information that can be requested and how the lookups are performed.

The exact command set available in an nslookup implementation can usually be determined by issuing the command “help” or “?” at the nslookup prompt. Table 291 shows some of the commands that are usually found in most nslookup implementations.

Table 291: Typical nslookup Utility Commands

Command and Parameters


<host> [<server>]

Look up the specified host, optionally using the specified DNS name server. Note that there is no actual command here, you just enter the name directly at the command prompt.

server <server>

Change the default server to <server>, using information obtained from the current default server.

lserver <server>

Change the default server to <server>, using information obtained from the initial name server—that is, the system’s default server that was in place when the nslookup command was started (prior to any preceding changes of the current name server in this session).


Changes the default name server to one of the DNS root name servers.

ls [-t <type>] <name>

Requests a list of information available for the specified domain name, by conducting a zone transfer. By default, the host names and addresses associated with the domain are listed; the “-t” option may be used to restrict the output to a particular record type. Other options may also be defined.

Most servers restrict the use of zone transfers to designated slave servers, so this command may not work for ordinary clients.


Displays help information (usually a list of valid commands and options).


Same as “help” (only on some systems).

set all

Displays the current value of all nslookup options

set <option>[=<value>]

Sets an option to control the behavior of the utility. Most implementations include quite a number of options, some of which are controlled by just specifying a keyword, while others require a value for the option. For example, “set recurse” tells the program to use recursive resolution, while “set norecurse” turns it off; “set retry=3” sets the number of retries to 3.


Quits the program.

Problems With nslookup

The nslookup utility is widely deployed on both UNIX and Windows systems, but the program is not without its critics. The complaints about it mainly center around its use of non-standard methods of obtaining information, rather than standard resolution routines. I have also read reports that it can produce spurious results in some cases. One example of a significant problem with the command is that it will abort if it is unable to perform reverse lookup of its own IP address. This can cause confusion, because users mistake that error for an error trying to find the name they were looking up.

For this and other reasons, a number of people in UNIX circles consider nslookup to be a “hack” of sorts, and for this reason, in some newer UNIXes nslookup has been deprecated. This simply means that it is still included in the operating system for compatibility, but it is not recommended and may be removed in the future. Instead, a pair of newer utilities are provided: host and dig.

Previous Topic/Section
TCP/IP Address Resolution Protocol Utility (arp)
Previous Page
Pages in Current Topic/Section
Next Page
TCP/IP DNS Registry Database Lookup Utility (whois/nicname)
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $

Home - Table Of Contents - Contact Us

The TCP/IP Guide (
Version 3.0 - Version Date: September 20, 2005

Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.