การใช้ NSlookup.exe

หมายเลขบทความ (Article ID): 200525 - ผลิตภัณฑ์ที่เกี่ยวข้องในบทความนี้
ขยายทั้งหมด | ยุบทั้งหมด

เนื้อหาบนหน้านี้

สรุป

Nslookup.exe คือ เครื่องมือบรรทัดคำสั่งสำหรับผู้ดูแลสำหรับการทดสอบ และการแก้ไขปัญหาเบื้องต้นเซิร์ฟเวอร์ DNS เครื่องมือนี้มีการติดตั้งพร้อมกับโพรโทคอล TCP/IP ผ่าน'แผงควบคุม' บทความนี้ประกอบด้วยคำแนะนำต่าง ๆ สำหรับใช้ Nslookup.exe

ข้อมูลเพิ่มเติม

เมื่อต้องการใช้ Nslookup.exe โปรดทราบต่อไปนี้:
  • ต้องมีการติดตั้งโพรโทคอล TCP/IP ในคอมพิวเตอร์ที่รัน Nslookup.exe
  • ต้องระบุอย่างน้อยหนึ่งเซิร์ฟเวอร์ของ DNS เมื่อคุณเรียกใช้คำสั่ง /ALL IPCONFIG จากพรอมต์คำสั่ง
  • เสมอ Nslookup จะ devolve ชื่อจากบริบทปัจจุบัน ถ้าคุณไม่สามารถที่จะรับแบบสอบถามชื่อ (นั่นคือ ใช้ต่อท้ายจุด) ทั้งหมด แบบสอบถามจะถูกผนวกเข้ากับบริบทปัจจุบัน ตัวอย่างเช่น การตั้งค่า DNS ปัจจุบันกำลัง att.com และดำเนินการแบบสอบถามบน www.microsoft.com แบบสอบถามแรกจะเข้าออกเป็น www.microsoft.com.att.com เนื่องจากการสอบถามกำลัง unqualified ลักษณะการทำงานนี้อาจไม่สอดคล้องกับ Nslookup รุ่นของผู้ขายอื่น และบทความนี้จะแสดงการ clarify ลักษณะการทำงานของ Microsoft Windows NT Nslookup.exe
  • ถ้าคุณได้ใช้งานการใช้รายการค้นหาในการค้นหาส่วนต่อท้ายโดเมนใบสั่งที่กำหนดไว้ในนั้นdnsแท็บนี้คุณสมบัติ TCP/IP ของ Microsoftหน้า devolution จะไม่เกิดขึ้น แบบสอบถามจะถูกผนวกเข้ากับส่วนต่อท้ายโดเมนที่ระบุไว้ในรายการ เมื่อต้องการหลีกเลี่ยงการใช้รายการค้นหา เสมอใช้กับทั้งหมดที่มีคุณสมบัติชื่อโดเมน (นั่นคือ เพิ่มแบบจุดต่อท้ายชื่อ)

Nslookup.exe สามารถรันในโหมดที่สอง: แบบโต้ตอบ และ noninteractive ได้ โหมด noninteractive มีประโยชน์เมื่อต้องการเพียงตัวเดียวชิ้นข้อมูลจะส่งคืน ไวยากรณ์สำหรับโหมด noninteractive คือ:

   nslookup [-option] [hostname] [server]
				

เมื่อต้องการเริ่มต้น Nslookup.exe ในโหมดโต้ตอบ เพียงแค่พิมพ์ "nslookup" ที่พร้อมท์รับคำสั่ง:

   C:\> nslookup
   Default Server:  nameserver1.domain.com
   Address:  10.0.0.1
   >
				

พิมพ์การ "วิธีใช้" หรือ "? " ที่พร้อมท์รับคำสั่งจะเป็นสร้างรายการของคำสั่งที่พร้อมใช้งาน สิ่งพิมพ์ที่พรอมต์คำสั่งที่ไม่รู้จักเป็นคำสั่งที่ถูกต้องจะสันนิษฐานเป็น ชื่อโฮสต์ และการพยายามที่จะแก้ไขโดยการใช้เซิร์ฟเวอร์เริ่มต้น เมื่อต้องการการขัดจังหวะการคำสั่งแบบโต้ตอบ กด CTRL + C เมื่อต้องการออกจากโหมดโต้ตอบ และกลับไปพรอมต์คำสั่ง พิมพ์exitหน้าจอพร้อมรับคำสั่ง

ต่อไปนี้จะแสดงผลของความช่วยเหลือ และประกอบด้วยตัวเลือกรายการทั้งหมด:

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

 NAME            - print info about the host/domain NAME using default 
                   server
 NAME1 NAME2     - as above, but use NAME2 as server
 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 recursive answer to query
    [no]search          - use domain search list
    [no]vc              - always use a virtual circuit
    domain=NAME         - set default domain name to NAME
    srchlist=N1[/N2/.../N6] - set domain to N1 and search list to N1, N2, 
                          and so on
    root=NAME           - set root server to NAME
    retry=X             - set number of retries to X
    timeout=X           - set initial time-out interval to X seconds
    type=X              - set query type (for example, A, ANY, CNAME, MX, 
                          NS, PTR, SOA, SRV)
    querytype=X         - same as type
    class=X             - set query class (for example, 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 current default server
 lserver NAME    - set default server to NAME, using initial server
 finger [USER]   - finger the optional NAME at the current default host
 root            - set current default server to the root
 ls [opt] DOMAIN [> FILE] - list addresses in DOMAIN (optional: output to 
                  FILE)

    -a          -  list canonical names and aliases
    -d          -  list all records
    -t TYPE     -  list records of the given type (for example, A, CNAME, 
                   MX, NS, PTR, and so on)

 view FILE       - sort an 'ls' output file and view it with pg
 exit            - exit the program
				

หมายเลขของตัวเลือกต่าง ๆ สามารถกำหนดใน Nslookup.exe โดยการทำงานนี้ตั้งค่าคำสั่งที่พร้อมท์รับคำสั่ง การแสดงรายการทั้งหมดของตัวเลือกเหล่านี้จะได้รับ โดยการพิมพ์การตั้งค่าทั้งหมด. ดูข้างต้น ภายใต้การตั้งค่าคำสั่งสำหรับงานพิมพ์ของตัวเลือกที่พร้อมใช้งาน


ค้นหาชนิดของข้อมูลอื่น

เมื่อต้องการค้นหาชนิดของข้อมูลที่แตกต่างกันภายในพื้นที่ของชื่อโดเมน ใช้ชนิดของการตั้งค่าหรือชุด q [uerytype]คำสั่งที่พร้อมท์รับคำสั่ง ตัวอย่างเช่น การสอบถามข้อมูล exchanger จดหมาย พิมพ์ต่อไปนี้:
   C:\> nslookup
   Default Server:  ns1.domain.com
   Address:  10.0.0.1

   > set q=mx
   > mailhost
   Server:  ns1.domain.com
   Address:  10.0.0.1

   mailhost.domain.com     MX preference = 0, mail exchanger =
                           mailhost.domain.com
   mailhost.domain.com     internet address = 10.0.0.5
   >
				

ในครั้งแรกที่ทำการสอบถามสำหรับชื่อระยะไกล คำตอบไม่มีสิทธิ์ แต่แบบสอบถามที่ตามมาคือ nonauthoritative ในครั้งแรกที่ queried โฮสต์ระยะไกล เซิร์ฟเวอร์ DNS ภายในเครื่องติดต่อเซิร์ฟเวอร์ DNS ที่ไม่มีสิทธิ์สำหรับโดเมนนั้น The local DNS server will then cache that information, so that subsequent queries are answered nonauthoritatively out of the local server's cache.


Querying Directly from Another Name Server

To query another name server directly, use theเซิร์ฟเวอร์:หรือlservercommands to switch to that name server. กระบวนการlservercommand uses the local server to get the address of the server to switch to, while theเซิร์ฟเวอร์:command uses the current default server to get the address.

ตัวอย่าง::
   C:\> nslookup

   Default Server:  nameserver1.domain.com
   Address:  10.0.0.1

   > server 10.0.0.2

   Default Server:  nameserver2.domain.com
   Address:  10.0.0.2
   >
				

Using Nslookup.exe to Transfer Entire Zone

Nslookup can be used to transfer an entire zone by using thelsคำสั่ง This is useful to see all the hosts within a remote domain. ไวยากรณ์สำหรับการlsมีคำสั่ง:

   ls [- a | d | t type] domain [> filename]
				

Using ls with no arguments will return a list of all address and name server data. กระบวนการ-การswitch will return alias and canonical names,-วwill return all data, and-twill filter by type.

ตัวอย่าง::

   >ls domain.com
   [nameserver1.domain.com]
    nameserver1.domain.com.    NS     server = ns1.domain.com
    nameserver2.domain.com                 NS     server = ns2.domain.com
    nameserver1                            A      10.0.0.1
    nameserver2                            A      10.0.0.2

   >
				

Zone transfers can be blocked at the DNS server so that only authorized addresses or networks can perform this function. The following error will be returned if zone security has been set:
*** Can't list domainexample.com.: Query refused

สำหรับข้อมูลเพิ่มเติม ดูบทความต่อไปนี้หรือบทความในฐานความรู้ของ Microsoft:
193837Windows NT 4.0 DNS Server Default Zone Security Settings

Troubleshooting Nslookup.exe

Default Server Timed Out

When starting the Nslookup.exe utility, the following errors may occur:
*** Can't find server name for addressw.x.y.z: Timed out

หมายเหตุ::w.x.y.zis the first DNS server listed in the DNS Service Search Order list.

*** Can't find server name for address 127.0.0.1: Timed out

The first error indicates that the DNS server cannot be reached or the service is not running on that computer. To correct this problem, either start the DNS service on that server or check for possible connectivity problems.

The second error indicates that no servers have been defined in the DNS Service Search Order list. To correct this problem, add the IP address of a valid DNS server to this list.

สำหรับข้อมูลเพิ่มเติม ดูบทความต่อไปนี้หรือบทความในฐานความรู้ของ Microsoft:
172060NSLOOKUP: ไม่ค้นหาชื่อเซิร์ฟเวอร์สำหรับที่อยู่ 127.0.0.1

Can't Find Server Name when Starting Nslookup.exe

When starting the Nslookup.exe utility, the following error may occur:

*** Can't find server name for address w.x.y.z: Non-existent domain


This error occurs when there is no PTR record for the name server's IP address. When Nslookup.exe starts, it does a reverse lookup to get the name of the default server. If no PTR data exists, this error message is returned. To correct make sure that a reverse lookup zone exists and contains PTR records for the name servers.

สำหรับข้อมูลเพิ่มเติม ดูบทความต่อไปนี้หรือบทความในฐานความรู้ของ Microsoft:
172953วิธีการติดตั้ง และการตั้งค่าคอนฟิกเซิร์ฟเวอร์ DNS ของ Microsoft

Nslookup on Child Domain Fails

When querying or doing a zone transfer on a child domain, Nslookup may return the following errors:

*** ns.domain.com can't find child.domain.com.: Non-existent domain
*** Can't list domain child.domain.com.: Non-existent domain


In DNS Manager, a new domain can be added under the primary zone, thus creating a child domain. Creating a child domain this way does not create a separate db file for the domain, thus querying that domain or running a zone transfer on it will produce the above errors. Running a zone transfer on the parent domain will list data for both the parent and child domains. To work around this problem, create a new primary zone on the DNS server for the child domain.

คุณสมบัติ

หมายเลขบทความ (Article ID): 200525 - รีวิวครั้งสุดท้าย: 11 กันยายน 2554 - Revision: 3.0
ใช้กับ
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows NT Server 4.0 Standard Edition
Keywords: 
kbinfo kbmt KB200525 KbMtth
แปลโดยคอมพิวเตอร์
ข้อมูลสำคัญ: บทความนี้แปลโดยซอฟต์แวร์การแปลด้วยคอมพิวเตอร์ของ Microsoft แทนที่จะเป็นนักแปลที่เป็นบุคคล Microsoft มีบทความที่แปลโดยนักแปลและบทความที่แปลด้วยคอมพิวเตอร์ เพื่อให้คุณสามารถเข้าถึงบทความทั้งหมดในฐานความรู้ของเรา ในภาษาของคุณเอง อย่างไรก็ตาม บทความที่แปลด้วยคอมพิวเตอร์นั้นอาจมีข้อบกพร่อง โดยอาจมีข้อผิดพลาดในคำศัพท์ รูปแบบการใช้ภาษาและไวยากรณ์ เช่นเดียวกับกรณีที่ชาวต่างชาติพูดผิดเมื่อพูดภาษาของคุณ Microsoft ไม่มีส่วนรับผิดชอบต่อความคลาดเคลื่อน ความผิดพลาดหรือความเสียหายที่เกิดจากการแปลเนื้อหาผิดพลาด หรือการใช้บทแปลของลูกค้า และ Microsoft มีการปรับปรุงซอฟต์แวร์การแปลด้วยคอมพิวเตอร์อยู่เป็นประจำ
ต่อไปนี้เป็นฉบับภาษาอังกฤษของบทความนี้:200525

ให้ข้อเสนอแนะ