Using 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.sybex.com instead of an IP address). When configuring DNS, 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.
NOTE:
The UNIX dig (short for domain information groper) utility does the exact same thing as nslookup. It is primarily a command-line utility that allows you to perform a single DNS lookup for a specific entity, but it may also be operated in batch mode for a series of lookups. While detailed information on this command is beyond the scope of this study guide, more information can be found on the Web by searching for “unix dig”.
The nslookup utility comes with Windows NT and later, as well as most versions of UNIX and Linux. It did not, however, come with Windows 95/98. You can run it from a Windows
command prompt. Once you are at the command prompt, you can start the nslookup utility by simply typing nslookup and pressing Enter. Once you’re inside this utility, the command prompt will change from something similar to 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 following output shows a sample of the display after the nslookup command has been entered at the C:\> prompt.
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
C:\>nslookup
Default Server: ns.company.com
Address: 10.89.155.68
>
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, you can simply
type in a domain name at the > prompt, like so:
>sybex.com
The nslookup utility would return this information:
Server: ns.company.com
Address: 10.89.155.68
Non-authoritative answer:
name: sybex.com
address: 10.0.0.1
This tells you that the server that returned the information was not responsible (authoritative) for the zone information of the domain for which you requested an address and that the name
server for the domain sybex.com is located at the IP address 10.0.0.1. This means that when your computer wants to talk to www.sybex.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 sybex.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
0 comments:
Post a Comment