Nslookup command in Windows
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012).
(Applies to Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012)
Display information that you can use to exploit Domain Name System (DNS) infrastructure information.Before using this tool, you should be familiar with how a DNS works.The nslookup command tool is only available if you have the TCP / IP protocol installed.
Syntax nslookup command
nslookup [] [{| -}]
nslookup / exit
nslookup / finger [] [{[>] | [>>]}]
?}
nslookup / ls [] [{[>] | [>>]}]
nslookup / lserver
nslookup / root
nslookup / server
nslookup / set [=]
nslookup / set all
nslookup / set class =
nslookup / set [no] d2
nslookup / set [no] debug
nslookup / set [no] defname
nslookup / set domain =
nslookup / set [no] ignore
nslookup / set port =
nslookup / set querytype =
nslookup / set [no] recurse
nslookup / set retry =
nslookup / set root =
nslookup / set [no] search
nslookup / set srchlist = [/ .]
nslookup / set timeout =
nslookup / set type =
nslookup / set [no] vc
nslookup / view
The nslookup command parameter
Parameters
Describe
The command nslookup exit
Exit nslookup.
Finger nslookup command
Connect to finger server on current computer.
nslookup help
Show a brief summary of extra commands in nslookup.
nslookup ls
List information for a DNS domain name.
nslookup lserver
Change the default server to the designated DNS domain.
nslookup root
Change the default server to the server for the root of the DNS domain space.
nslookup server
Change the default server to the designated DNS domain.
nslookup set
Changing configuration settings affects search functionality.
nslookup set all
Print the current values of configuration settings.
nslookup set class
Or change the query class.This class specifies the protocol group of information.
nslookup set d2
Enable or disable comprehensive debugging mode.All fields of each package will be printed.
nslookup set debug
Enable or disable debugging mode.
nslookup / set defname
Enable or disable the default DNS domain debugging mode for a single component lookup request.A single component is a component that does not containspaces.
nslookup set domain
Change the default DNS domain name to the specified name.
nslookup / set ignore
Ignore the packet truncation errors.
nslookup set port
Change the default DNS / UDP name server port to the specified value.
nslookup set querytype
Change the type of resource record for queries.
nslookup set recurse
Request DNS name server to query other servers if the server has no information.
nslookup set retry
Install the number of retries.
nslookup set root
Change the name of the original server used for queries.
nslookup set search
Add DNS domains in the DNS domain search list on request until the answer is received.This applies when the request is placed and searched contains at least a certain amount of time, but does not end with aspace.
nslookup set srchlist
Change the default DNS domain name and search list.
nslookup set timeout
Change the first number of seconds to wait for a reply to the request.
nslookup set type
Change the resource record type for the query.
nslookup set vc
Specify to use or not to use virtual circuits when sending requests to the server.
nslookup view
Arrange and list the output of sub-commands or previous ls commands.
Nslookup command comment
1. If computerTofind is an IP address and the query is for an A or PTR resource record type, the computer's name will be returned.If computerTofind is the name and there is no space, the default DNS domain name will be added to the name.This action will depend on the status of the following subset commands: domain, srchlist, defname andsearch.
2. If you type a hyphen (-) instead of computerTofind, the command prompt will switch to nslookup interactive mode.
3. Command line length must be less than 256 characters.
4. nslookup has two modes: interactive and non-interactive (interactive and noninteractive).If you only need to search for a separate piece of data, use non-interactive mode.For the first parameter, enter the name or IP address of the computer you want to look up.For the second parameter, enter the name or IP address of the DNS identifier server.If you omit the second argument, nslookup will use the default DNS name server.If you need to look up more than one piece of data separately, you can use interactive mode.Type the hyphen (-) for the first parameter and the name or IP address of the DNS name server for the second parameter, or ignore both parameters and nslookup will use the default DNS name server.Here are some tips on how to work in interactive mode:
- To interrupt interactive commands at any time, press CTRL + B.
- To exit, enter exit.
- To handle a built-in command as a computer name, precede it with an escape character ().
- An unrecognized command will be interpreted as a computer name.
5. If the lookup request fails, nslookup will print an error message.The following is a list of possible error messages:
timed out : The server did not respond to requests after a certain time and a certain number of retries.You can set the timeout period using the set timeout sub command.
No response from server:There is no DNS name server running on the server computer.
No records:DNS name servers do not have the resource records of the current query type for the computer, although the computer name is valid.The query type is specified with the set querytype command.
Nonexistent domain: Computer or DNS domain name does not exist.
Connection refused: Connection denied.
-Or-
Network is unreachable:Cannot make a connection to a DNS name server or finger server.This error usually occurs with ls and finger requests.
Server failure:The DNS name server has found internal inconsistencies in its database and cannot return a valid answer.
Refused: The DNS name server refused to serve the request.
format error:The DNS server recognizes that the requested package is not in the proper format.It may indicate an error in nslookup
For more information about nslookup and DNS commands, refer to the following sources:
- Lee, T., Davies, J. 2000.Microsoft Windows 2000 TCP / IP Protocols and Services Technical Reference.Redmond, Washington: Microsoft Press.
- Albitz, P., Loukides, M. and C. Liu.2001. DNS and BIND, Fourth edition.Sebastopol, California: O'Reilly and associates, Inc.
- Larson, M. and C. Liu.2001.DNS on Windows 2000.Sebastopol, California: O'Reilly and associates, Inc.
The nslookup command example
Each command line option includes a dash (-) followed immediately by the command name and an equal sign (=) in some cases, and then a value.For example, to change the default query type to server information (computer) and initial timeout to 10 seconds, enter: nslookup -querytype = hinfo -timeout = 10.
See more:
- The nfsstat command in Windows
- The nlbmgr command in Windows
- Netcfg command in Windows
- Nbtstat command in Windows
- Bitsadmin create command in Windows
You should read it
- Sub-commands in nslookup Windows command (Part 3)
- Sub-commands in nslookup Windows command (Part 2)
- Sub-commands in the nslookup Windows command (Part 1)
- Use NSLOOKUP to diagnose the DNS Server
- 10 commands Windows 7 network administrators need to know
- Del command in Windows
- Set command in Windows
- Mapadmin command in Windows
- Cmd command in Windows
- Command at in Windows
- Fc command in Windows
- The echo command in Windows
Maybe you are interested
How to use Photoshop CS5 - Part 15: Remove wrinkles with the Healing Brush tool The list of foods that contain the most iron is easy to find 10 signs that you are overloaded at work and need to rest immediately Why can overwork can adversely affect your career? 9 things you should not do when tired Why is working 4 days a week harmful to health?