You are on page 1of 5

MS-DOS and Windows command line nslookup command https://www.computerhope.com/nslookup.

htm

MS-DOS and Windows command line nslookup


command
Updated: 06/12/2020 by Computer Hope

Nslookup is an MS-DOS utility that enables a user to


look up the IP address of a domain or host on a network.
The nslookup command can also perform a reverse
lookup using an IP address to find the domain or host
associated with that IP address.

Tip: If you are using earlier versions of Microsoft Windows


(Windows 95, Windows 98, or Windows ME) and you need
the nslookup command, you need to download an alternative,
third-party program.

Availability
Nslookup is an external command that is available for the following Microsoft operating systems as
nslookup.exe.

Windows NT

Windows 2000

Windows XP

Windows 7

Windows 8

Windows 10

Nslookup syntax

1 sur 5 11/07/2020 à 22:19


MS-DOS and Windows command line nslookup command https://www.computerhope.com/nslookup.htm

Windows Vista and later syntax


nslookup [-opt ...] # interactive mode using default server
nslookup [-opt ...] - server # interactive mode using 'server'
nslookup [-opt ...] host # only look up 'host' using default server
nslookup [-opt ...] host server # only look up 'host' using
'server'

Windows XP syntax
Commands: (identifiers are shown in uppercase, [] means optional)

NAME Print info about the host/domain NAME using default server.

NAME1 Same as the command listed above, but uses NAME2 as the server.
NAME2

help or ? Print info on common commands.

set OPTION Set an option.

all Print options, current server, and host.

[no]debug Print debugging information.

[no]d2 Print exhaustive debugging information.

[no]defname Append domain name to each query.

[no]recurse Ask for a recursive answer to a query.

[no]search Use domain search list.

[no]vc Always use a virtual circuit.

2 sur 5 11/07/2020 à 22:19


MS-DOS and Windows command line nslookup command https://www.computerhope.com/nslookup.htm

domain=NAME Set default domain name to NAME.

srchlist=N1[/N2 Set domain to N1 and search list to N1,N2, etc.


/.../N6]

root=NAME Set root server to NAME.

retry=X Set the number of retries to X.

timeout=X Set the initial time-out interval to X seconds.

Type=X Set query type (ex.


A,ANY,CNAME,MX,NS,PTR,SOA,SRV).

queryType=X Same as type.

class=X Set query class (ex. IN (Internet), ANY).

[no]msxfr Use MS fast zone transfer.

ixfrver=X Current version to use in IXFR transfer request.

server NAME Set default server to NAME, using the current default server.

lserver NAME Set default server to NAME, using the initial server.

finger [USER] Finger the optional NAME at the current default host.

root Set the current default server to the root.

ls [opt] List addresses in DOMAIN (optional: output to FILE).


DOMAIN [>
FILE]

3 sur 5 11/07/2020 à 22:19


MS-DOS and Windows command line nslookup command https://www.computerhope.com/nslookup.htm

-a List canonical names and aliases.

-d Lists all records.

-t List records of the given type (e.g., A,CNAME,MX,NS,PTR


type etc.).

view FILE Sort an 'ls' output file and view it with pg.

exit Exit the program.

Nslookup examples
This command is often used to perform a reverse lookup on an IP address as shown in the example below.
The first section specifies the domain name of the requested server. The IP address for that server is
displayed in the second section.

nslookup 204.228.150.3

Server: ns.computerhope.com
Address: 1.1.1.1

Name: www.computerhope.com
Address: 204.228.150.3

nslookup

4 sur 5 11/07/2020 à 22:19


MS-DOS and Windows command line nslookup command https://www.computerhope.com/nslookup.htm

Running nslookup without specifying an IP address or domain name displays your router's server and
address. To get out of the > prompt, type exit and press Enter.

© 2020 Computer Hope

5 sur 5 11/07/2020 à 22:19

You might also like