nslookup is a command which can be used to troubleshoot DNS issues.
You can use the nslookup command interactively from which you can change servers, set query options, and debug DNS.
You can also use nslookup non-interactively from the command line to issue simple queries.
Using nslookup interactively
1. Enter nslookup at the command line. The nslookup prompt appears.
2. View the current options by entering set all.
3. Change any desired options by entering set option.
4. Issue nslookup commands.
5. Enter exit to leave nslookup.
nslookup interactive commands
These sample commands are available from the nslookup shell:
Return the IP address of domain.com.
Return the name matching the IP address you enter.
Set the query type to the Name Server record. Future queries of names and IP addresses return the NS record from that host.
Restore the query type to the Address record.
Changes the default DNS server or the server which is is queried.
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 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