Information Technology Reference
In-Depth Information
nslookup DNS_name_or_IP_address server_IP_address
This command will look up a DNS name or address using a server at the IP address
you specify.
Using Nslookup in Interactive Mode
Nslookup is a lot more useful in interactive mode because you can enter several commands
in sequence. Entering nslookup by itself (without specifying a query or server) puts it in
interactive mode, where it will stay until you type exit and press Enter. Before that point,
you can look up lots of useful stuff. The following are some of the tasks you can perform
with nslookup in interactive mode:
Setting Options with the set Command While in interactive mode, you can use the set
command to configure how the resolver will carry out queries. Table 2.5 shows a few of the
options available with set .
Table 2.5
Command-line options available with the set command
Option
Purpose
set all
Shows all the options available.
set d2
Puts nslookup in debug mode so that you can examine the
query and response packets between the resolver and the
server.
set domain=domain name
Tells the resolver what domain name to append for unquali-
fied queries.
set timeout=timeout
Tells the resolver how long to keep trying to contact the
server. This option is useful for slow links where queries fre-
quently time out and the wait time must be lengthened.
set type=record type
Tells the resolver which type of resource records to search
for (for example, A, PTR, or SRV). If you want the resolver to
query for all types of resource records, type settype=all .
Looking Up a Name While in interactive mode, you can look up a name just by typing it:
stellacon . com . In this example, stellacon is the owner name for the record for which you
are searching, and .com is the server you want to query.
You can use the wildcard character ( * ) in your query. For example, if you want to look for
all resource records that have k as the first letter, just type k* as your query.
Looking Up a Record Type If you want to query a particular type of record (for instance,
an MX record), use the set type command. The command set type=mx tells nslookup
you're interested only in seeing MX records that meet your search criteria.
Search WWH ::




Custom Search