TCP/IP Transmission Control Protocol/Internet Protocol

Resource: Windows 2000 Server Resource kit TCP/IP Core Networking Guide

> Part2 > TCPIP > Commands > Nslookup

Nslookup

زمانی که در محیط  Dos شما از این دستور استفاده کنید .این دستور نام و IP Address سرور DNS که بر روی سیستم شما تنظیم شده را نشان می دهد . این دستور برای تست کردن عمل Name Resolution

یک سرور DNS و نیز یک DNS Client استفاده می شود .با تایپ ? Question Mark  شما می توانیدلیست Command های محیط Nslookup  را مشاهده کنید .  در زیر یک نمونه استفاده از این دستور

را مشاهده می کنید که توسط Command بنام Set d2 نام یک Host در شبکه بنام Rain-city را چک کرده . تذکر در قسمت ANSWERS نام Rain-city.reskit.com را از نوع

 CNAME Record نمایش داده. پس این رکورد در Zone مربوطه در DNS وجود دارد .اما  Alias  و یا نام مستعاری از یک A رکورد بنام Seattle می باشد .

 برای اطلاعات بیشتر در مورد CNAME Record به قسمت DNS مراجعه کنید .

F:\>nslookup

(null)   testpc1.reskit.com

Address: 172.16.8.190

> set d2

> rain-city

(null) testpc1.reskit.com

Address: 172.16.8.190

------------

SendRequest(), len 49

    HEADER:

        opcode = QUERY, id = 2, rcode = NOERROR

        header flags: query, want recursion

        questions = 1,  answers = 0,  authority records = 0,  additional = 0

    QUESTIONS:

        rain-city.reskit.com, type = A, class = IN

------------

------------

Got answer (108 bytes):

    HEADER:

        opcode = QUERY, id = 2, rcode = NOERROR

        header flags: response, auth. answer, want recursion, recursion avail.

        questions = 1,  answers = 2,  authority records = 0,  additional = 0

    QUESTIONS:

        rain-city.reskit.com, type = A, class = IN

    ANSWERS:

    ->  rain-city.reskit.com

        type = CNAME, class = IN, dlen = 31

        canonical name = seattle.reskit.com

        ttl = 86400 (1 day)

    ->  seattle.reskit.com

        type = A, class = IN, dlen = 4

        internet address = 172.16.2.3

        ttl = 86400 (1 day)

------------

(null)   seattle.reskit.com

Address: 172.16.2.3

Aliases: rain-city.reskit.com

جدول زیر کل Command موجود در محیط Nslookup را نمایش می دهد .

Switch Function
nslookup Launches the nslookup program.
set debug Launches debug mode from within nslookup.
set d2 Launches verbose debug mode from within nslookup.
host name Returns the IP address for the specified host name.
NAME Displays information about the host/domain NAME using default server
NAME1 NAME2 As above, but uses NAME2 as server
help or ? Displays information about common commands
set OPTION Sets an option
All Displays options, current server and host.
[no]debug Displays debugging information.
[no]defname Appends domain name to each query.
[no]recurse Asks for recursive answer to query.
[no]search Uses domain search list.
[no]vc Always uses a virtual circuit.
domain=NAME Sets default domain name to NAME.
srchlist=N1[/N2/.../N6] Sets domain to N1 and search list to N1,N2, and so on.
root =NAME Sets root server to NAME.
retry=X Sets number of retries to X.
timeout=X Sets initial timeout interval to X seconds.
type=X Sets query type (such as A, ANY, CNAME, MX, NS, PTR, SOA, SRV).
querytype=X Same as type.
class=X Sets query class (ex. IN (Internet), ANY).
[no]msxfr Uses MS fast zone transfer.
ixfrver=X Current version to use in IXFR transfer request.
Server NAME Sets default server to NAME, using current default server.
Lserver NAME Sets default server to NAME, using initial server.
Finger [USER Fingers the optional NAME at the current default host.
Root Sets current default server to the root.
ls [opt] DOMAIN [> FILE] Lists addresses in DOMAIN (optional: output to FILE).
-a Lists canonical names and aliases.
-d Lists all records.
-t TYPE Lists records of the given type (For example, A, CNAME, MX, NS, PTR and so on).
View FILE Sorts the output file from the 'ls' option described earlier and displays it page by page.
Exit Exits Nslookup and returns to the command prompt.
 

TCP/IP Transmission Control Protocol/Internet Protocol

LastUpdate:2005/04/05

> Part2 > TCPIP > Commands > Nslookup