The nslookup Utility

Whenever you are configuring a server or workstation to connect to the Internet, you will always have to configure DNS if you want name resolution to happen (i.e., if you want to be able to type www.yahoo.com instead of an IP address). When doing this, it is very advantageous to be able to test what IP address DNS is returning to ensure that it is working properly. The nslookup utility allows you to query a name server and quickly find out which name resolves to which IP address.

The nslookup utility comes with Windows NT and Windows 2000, as well as most versions of Unix and Linux. It does not, however, come with Windows 95/98. You can run it from a Windows command prompt (which can be accessed from Start Ø Programs Ø Command Prompt). Once you are in the command prompt, you can start the nslookup utility by simply typing nslookup and pressing Enter. Once inside this utility, the command prompt will change from a C:\> sign to a shorter > sign. It will also display the name and IP address of the default DNS server you will be querying (you can change it, if necessary). Once here, you can start using nslookup.

The primary job of nslookup is to tell you the many different features of a particular domain name, the name servers that serve it, and how they are configured. For example, if you simply type in a domain name at the > prompt, like so:

>sybek.com 

the nslookup utility would return this information:

name: sybek.com  address: 10.0.0.1 

This tells you that the name server for the domain sybek.com is located at the IP address 10.0.0.1. This means that when your computer wants to talk to www.sybek.com, it must talk to the name server at 10.0.0.1 to find out the IP address of the host called www on the sybek.com domain.

You can also ask nslookup for other information by setting a different option within nslookup. Just type set < option> at the > prompt and replace < option> with the actual option you want to use. Table 4.7 gives some of the common options and their uses.

Table 4.7: The nslookup Options and Their Uses

Option

Use

type=mx

Returns the responsible e-mail server for that domain

Domain=<domain name>

Sets the current domain name to <domain name>

Retry= X

Specifies the number of retries (the number of seconds is specified by X)




Network+ Study Guide
Network+ Study Guide
ISBN: 470427477
EAN: N/A
Year: 2002
Pages: 151

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net