nslookup

https://technet.microsoft.com/en-us/library/cc940085.aspx

Nslookup is a useful tool for troubleshooting DNS problems, such as host name resolution.

When you start Nslookup, it shows the host name and IP address of the DNS server that is configured for the local system, and then display a command prompt for further queries.

If you type a question mark (? ), Nslookup shows all available commands.

You can exit the program by typing exit .

To look up a host's IP address using DNS, type the host name and press Enter.

Nslookup defaults to using the DNS server configured for the computer on which it is running, but you can focus it on a different DNS server by typing server < name> 

(where < name> is the host name of the server you want to use for future lookups).

Once another server is specified, anything entered after that point is interpreted as a host name.

Nslookup employs the domain name devolution method.

If you type in a host name and press ENTER, Nslookup appends the domain suffix of the computer (such as cswatcp.reskit.com) to the host name before querying the DNS.

If the name is not found, then the domain suffix is "devolved" by one level (in this case to reskit.com) and the query is repeated.

Windows 2000 computers only devolve names to the second level domain (reskit.com in this example), so if this query fails, no further attempts are made to resolve the name.

If a fully qualified domain name is typed in (as indicated by a trailing dot) then the DNS server is only queried for that name and no devolution is performed.

To look up a host name that is completely outside your domain, you must type in a fully qualified domain name.

Nslookup's debug mode is a useful troubleshooting feature;

you can set the local computer into this mode by typing set debug ,

or for even greater detail, set d2 .

In debug mode, Nslookup lists the steps being taken to complete its commands, as shown in this example:

C:Usersclu>nslookup
Default Server: sasygsha01dc01.asnet.accorservices.net
Address: 172.16.210.13

==================================

本机的ip是172.31.212.20

C:Usersclu>nslookup 172.31.212.20
Server: sasygsha01dc01.asnet.accorservices.net
Address: 172.16.210.13

Name: wasygsha01-1020.asnet.accorservices.net【这个是computer的full name】
Address: 172.31.212.20

===================================

C:Usersclu>nslookup www.baidu.com
Server: sasygsha01dc01.asnet.accorservices.net
Address: 172.16.210.13

Non-authoritative answer:
Name: www.a.shifen.com
Addresses: 61.135.169.121
61.135.169.125
Aliases: www.baidu.com

==================================

原文地址:https://www.cnblogs.com/chucklu/p/6898379.html