Using the nslookup Command to Troubleshoot Name Resolution IssuesThis command is another simple command that is available with all TCP/IP implementations . Its purpose is to query a DNS name server to find out the name registration information for a particular host. By using nslookup , you can find out whether the address that is associated with the computer's hostname is accurate. This can be handy for troubleshooting if you are trying to use one of the TCP/IP utilities, such as FTP or Telnet, to reach a particular host by name, yet find that you cannot establish a connection or that the remote system is not the one you thought it would be. This utility can be run in two different modes. First, you can specify all the commands on a command line and get a result returned from a DNS name server ( noninteractive mode). Second, you can enter "batch" mode (called interactive mode by Microsoft) and issue several commands in a row to the server. The basic syntax for the command in Windows operating systems is nslookup [- option ... ] [ computer-to-find - [ server ]] Options you can use with the command are
For example: C:> nslookup www.twoinc.com This command sends an inquiry to the default DNS server. If information is received, it will print the name of the server that the information is from, and then print the IP address of the server you inquired about. For example: C:\>nslookup www.twoinc.com Server: home8-qwest.bellatlantic.net Address: 151.204.0.84 Non-authoritative answer: Name: www.twoinc.com Address: 216.65.33.219 In this example you can also see that the server that gave the response indicates that it is a non-authoritative answer . This means that the server is not the server that actually holds the domain name record for this domain, but has cached the name locally. The record for the domain is located elsewhere in the DNS hierarchy. The nslookup command also enables you to enter several options on the command line or to use these features from within the interactive environment. When it's used on the command line, precede each option with a minus sign ( “). The options and values that can be used with Windows NT through Windows 2003 Servers are listed here:
There are many set commands you can use to customize the way nslookup works. For more information, check the help text that comes with the version you are using. Using nslookup in interactive mode enables you to perform multiple hostname lookups without having to retype the nslookup command. Use the exit command to exit the interactive mode. |