Jump to content

DNS Troubleshooting


Recommended Posts

Using nslookup interactively

Enter nslookup at the command line. The nslookup prompt appears.

View the current options by entering set all.

Change any desired options by entering set option.

Issue nslookup commands.

Enter exit to leave nslookup.

For a list of sample commands, see ``nslookup interactive commands''. For a list of options, see ``nslookup interactive options''.

nslookup interactive commands

These sample commands are available from the nslookup shell:


Return the IP address of volga.

Return the name matching the IP address you enter.

set querytype=ns

Set the query type to the Name Server record. Future queries of names and IP addresses return the NS record from that host.

set querytype=a

Restore the query type to the Address record.

server server

Make server the default server that is queried.

nslookup interactive options

Here are the commonly used options of nslookup. For a complete list, see the manual page for nslookup(1Mtcp).


Sets the query type to recursive. When toggled to norecurse, nslookup performs iterative queries.


Sets the query type to the DNS data type specified. Common types include a (Address), any (any data type), mx (Mail Exchanger), and ns (Name Server).


Resends the query n times before giving up.

root=root server

Sets the root server to the server you enter.


The period of time nslookup waits for a response after the query is sent. This period doubles between each retry.

You can save any of these options in a .nslookuprc file in your home directory. The format of this file, which is searched for each time you invoke nslookup, is one set command per line. Here is an example, which sets the query type to address records, the domain to mynet.com, and sets the timeout on requests to 10 seconds:

set querytype=a

set domain=mynet.com

set timeout=10

Querying a single name or address

To issue a simple query from the command line, use one of the following forms of the command:

nslookup name

nslookup IP_address

nslookup should return the desired answer by querying the default server. To query a different server, enter one of the following forms of the command:

nslookup name server

nslookup IP_address server

Link to comment
Share on other sites


  • Create New...