{"id":2343,"date":"2007-09-05T12:37:05","date_gmt":"2007-09-05T04:37:05","guid":{"rendered":"https:\/\/www.ecjtu.com\/keith\/archives\/2343"},"modified":"2007-09-30T12:42:28","modified_gmt":"2007-09-30T04:42:28","slug":"nslookup%e5%91%bd%e4%bb%a4%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.ecjtu.com\/keith\/archives\/2343","title":{"rendered":"Nslookup\u547d\u4ee4\u8be6\u89e3"},"content":{"rendered":"<p>Nslookup.exe \u53ef\u4ee5\u5728\u4e24\u79cd\u6a21\u5f0f\u4e0b\u8fd0\u884c\uff1a\u4ea4\u4e92\u5f0f\u548c\u975e\u4ea4\u4e92\u5f0f\u3002\u5f53\u9700\u8981\u8fd4\u56de\u5355\u5757\u6570\u636e\u65f6\uff0c\u8bf7\u4f7f\u7528\u975e\u4ea4\u4e92\u5f0f\u6a21\u5f0f\u3002\u975e\u4ea4\u4e92\u6a21\u5f0f\u7684\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<p>nslookup [-option] [hostname] [server]<\/p>\n<p>\u8981\u5728\u4ea4\u4e92\u6a21\u5f0f\u4e0b\u542f\u52a8 Nslookup.exe\uff0c\u53ea\u9700\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\u8f93\u5165 nslookup\uff1a<\/p>\n<p>C:\\&gt; nslookup<br \/>\nDefault Server: nameserver1.domain.com<br \/>\nAddress: 10.0.0.1<br \/>\n&gt;<\/p>\n<p>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\u8f93\u5165 help \u6216 ? \u5c06\u751f\u6210\u53ef\u7528\u7684\u547d\u4ee4\u5217\u8868\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\u8f93\u5165\u7684\u4efb\u4f55\u5185\u5bb9\uff0c\u5982\u679c\u5b83\u4e0d\u662f\u6709\u6548\u547d\u4ee4\uff0c\u5219\u5047\u8bbe\u5b83\u662f\u4e3b\u673a\u540d\uff0c\u5c1d\u8bd5\u4f7f\u7528\u9ed8\u8ba4\u670d\u52a1\u5668\u6765\u89e3\u6790\u5b83\u3002\u8981\u4e2d\u65ad\u4ea4\u4e92\u547d\u4ee4\uff0c\u8bf7\u6309 CTRL+C\u3002\u8981\u9000\u51fa\u4ea4\u4e92\u6a21\u5f0f\u5e76\u8fd4\u56de\u5230\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\uff0c\u5e76\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\u8f93\u5165 exit\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u5e2e\u52a9\u8f93\u51fa\uff0c\u5176\u4e2d\u5305\u542b\u9009\u9879\u7684\u5b8c\u6574\u5217\u8868\uff1a<\/p>\n<p>Commands: (identifiers are shown in uppercase, [] means optional)<\/p>\n<p>NAME &#8211; print info about the host\/domain NAME using default<br \/>\nserver<br \/>\nNAME1 NAME2 &#8211; as above, but use NAME2 as server<br \/>\nhelp or ? &#8211; print info on common commands<br \/>\nset OPTION &#8211; set an option<\/p>\n<p>all &#8211; print options, current server and host<br \/>\n\u3010no\u3011debug &#8211; print debugging information<br \/>\n\u3010no\u3011d2 &#8211; print exhaustive debugging information<br \/>\n\u3010no\u3011defname &#8211; append domain name to each query<br \/>\n\u3010no\u3011recurse &#8211; ask for recursive answer to query<br \/>\n\u3010no\u3011search &#8211; use domain search list<br \/>\n\u3010no\u3011vc &#8211; always use a virtual circuit<br \/>\ndomain=NAME &#8211; set default domain name to NAME<br \/>\nsrchlist=N1[\/N2\/&#8230;\/N6] &#8211; set domain to N1 and search list to N1, N2,<br \/>\nand so on<br \/>\nroot=NAME &#8211; set root server to NAME<br \/>\nretry=X &#8211; set number of retries to X<br \/>\ntimeout=X &#8211; set initial time-out interval to X seconds<br \/>\ntype=X &#8211; set query type (for example, A, ANY, CNAME, MX,<br \/>\nNS, PTR, SOA, SRV)<br \/>\nquerytype=X &#8211; same as type<br \/>\nclass=X &#8211; set query class (for example, IN (Internet), ANY)<br \/>\n\u3010no\u3011msxfr &#8211; use MS fast zone transfer<br \/>\nixfrver=X &#8211; current version to use in IXFR transfer request<\/p>\n<p>server NAME &#8211; set default server to NAME, using current default server<br \/>\nlserver NAME &#8211; set default server to NAME, using initial server<br \/>\nfinger [USER] &#8211; finger the optional NAME at the current default host<br \/>\nroot &#8211; set current default server to the root<br \/>\nls [opt] DOMAIN [&gt; FILE] &#8211; list addresses in DOMAIN (optional: output to<br \/>\nFILE)<\/p>\n<p>-a &#8211; list canonical names and aliases<br \/>\n-d &#8211; list all records<br \/>\n-t TYPE &#8211; list records of the given type (for example, A, CNAME,<br \/>\nMX, NS, PTR, and so on)<\/p>\n<p>view FILE &#8211; sort an &#8216;ls&#8217; output file and view it with pg<br \/>\nexit &#8211; exit the program<\/p>\n<p>\u901a\u8fc7\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\u8fd0\u884c set \u547d\u4ee4\uff0c\u53ef\u4ee5\u5728 Nslookup.exe \u4e2d\u8bbe\u7f6e\u8bb8\u591a\u4e0d\u540c\u7684\u9009\u9879\u3002\u8981\u5f97\u5230\u8fd9\u4e9b\u9009\u9879\u7684\u5b8c\u6574\u5217\u8868\uff0c\u53ea\u9700\u8f93\u5165 set all\u3002\u8bf7\u53c2\u89c1\u4ee5\u4e0a\u5185\u5bb9\uff0c\u5728 set \u547d\u4ee4\u4e0b\uff0c\u5f97\u5230\u53ef\u7528\u9009\u9879\u7684\u6253\u5370\u8f93\u51fa\u3002<\/p>\n<p>\u67e5\u627e\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b<\/p>\n<p>\u8981\u5728\u57df\u540d\u7a7a\u95f4\u4e2d\u67e5\u627e\u4e0d\u540c\u7684\u6570\u636e\u7c7b\u578b\uff0c\u8bf7\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e0b\u4f7f\u7528 set type \u6216 set q[uerytype] \u547d\u4ee4\u3002\u4f8b\u5982\uff0c\u8981\u67e5\u8be2\u90ae\u4ef6\u4ea4\u6362\u5668\u6570\u636e\uff0c\u8bf7\u8f93\u5165\uff1a<br \/>\nC:\\&gt; nslookup<br \/>\nDefault Server: ns1.domain.com<br \/>\nAddress: 10.0.0.1<\/p>\n<p>&gt; set q=mx<br \/>\n&gt; mailhost<br \/>\nServer: ns1.domain.com<br \/>\nAddress: 10.0.0.1<\/p>\n<p>mailhost.domain.com MX preference = 0, mail exchanger =<br \/>\nmailhost.domain.com<br \/>\nmailhost.domain.com internet address = 10.0.0.5<br \/>\n&gt;<\/p>\n<p>\u7b2c\u4e00\u6b21\u67e5\u8be2\u662f\u67e5\u627e\u8fdc\u7a0b\u540d\u79f0\uff0c\u7b54\u6848\u662f\u6743\u5a01\u7684\uff0c\u4f46\u968f\u540e\u7684\u67e5\u8be2\u662f\u975e\u6743\u5a01\u7684\u3002\u7b2c\u4e00\u6b21\u67e5\u8be2\u8fdc\u7a0b\u4e3b\u673a\u65f6\uff0c\u672c\u5730 DNS \u670d\u52a1\u5668\u4e0e\u4f5c\u4e3a\u8be5\u57df\u6743\u5a01\u7684 DNS \u670d\u52a1\u5668\u53d6\u5f97\u8054\u7cfb\u3002\u7136\u540e\uff0c\u672c\u5730 DNS \u670d\u52a1\u5668\u7f13\u5b58\u8be5\u4fe1\u606f\uff0c\u4ee5\u4fbf\u4ece\u672c\u5730\u670d\u52a1\u5668\u7f13\u5b58\u4e2d\u975e\u6743\u5a01\u5730\u56de\u7b54\u968f\u540e\u7684\u67e5\u8be2\u3002<\/p>\n<p>\u76f4\u63a5\u4ece\u53e6\u4e00\u4e2a\u540d\u79f0\u670d\u52a1\u5668\u4e2d\u8fdb\u884c\u67e5\u8be2<\/p>\n<p>\u8981\u76f4\u63a5\u67e5\u8be2\u53e6\u4e00\u4e2a\u540d\u79f0\u670d\u52a1\u5668\uff0c\u8bf7\u4f7f\u7528 server \u6216 lserver \u547d\u4ee4\u5207\u6362\u5230\u8be5\u540d\u79f0\u670d\u52a1\u5668\u3002lserver \u547d\u4ee4\u4f7f\u7528\u672c\u5730\u670d\u52a1\u5668\u5f97\u5230\u8981\u5207\u6362\u7684\u670d\u52a1\u5668\u5730\u5740\uff0c\u800c server \u547d\u4ee4\u4f7f\u7528\u5f53\u524d\u9ed8\u8ba4\u670d\u52a1\u5668\u5f97\u5230\u8be5\u5730\u5740\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<br \/>\nC:\\&gt; nslookup<\/p>\n<p>Default Server: nameserver1.domain.com<br \/>\nAddress: 10.0.0.1<\/p>\n<p>&gt; server 10.0.0.2<\/p>\n<p>Default Server: nameserver2.domain.com<br \/>\nAddress: 10.0.0.2<br \/>\n&gt;<\/p>\n<p>\u4f7f\u7528 Nslookup.exe \u8f6c\u79fb\u6574\u4e2a\u533a\u57df<\/p>\n<p>\u4f7f\u7528 ls \u547d\u4ee4\uff0cNslookup \u53ef\u4ee5\u7528\u4e8e\u8f6c\u79fb\u6574\u4e2a\u533a\u57df\u3002\u67e5\u770b\u8fdc\u7a0b\u57df\u4e2d\u7684\u6240\u6709\u4e3b\u673a\uff0c\u8fd9\u662f\u6709\u7528\u7684\u3002ls \u547d\u4ee4\u7684\u8bed\u6cd5\u5982\u4e0b\uff1a<\/p>\n<p>ls [- a | d | t type] domain [&gt; filename]<\/p>\n<p>\u4e0d\u5e26\u53c2\u6570\u4f7f\u7528 ls \u547d\u4ee4\u5c06\u8fd4\u56de\u6240\u6709\u5730\u5740\u548c\u540d\u79f0\u670d\u52a1\u5668\u6570\u636e\u7684\u5217\u8868\u3002-a \u53c2\u6570\u5c06\u8fd4\u56de\u522b\u540d\u548c\u6b63\u5f0f\u540d\u79f0\uff0c-d \u5c06\u8fd4\u56de\u6240\u6709\u6570\u636e\uff0c\u800c -t \u5c06\u6309\u7c7b\u578b\u8fdb\u884c\u7b5b\u9009\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<p>&gt;ls domain.com<br \/>\n[nameserver1.domain.com]<br \/>\nnameserver1.domain.com. NS server = ns1.domain.com<br \/>\nnameserver2.domain.com NS server = ns2.domain.com<br \/>\nnameserver1 A 10.0.0.1<br \/>\nnameserver2 A 10.0.0.2<\/p>\n<p>&gt;<\/p>\n<p>\u5728 DNS \u670d\u52a1\u5668\u4e2d\u53ef\u4ee5\u6309\u5757\u8f6c\u79fb\u533a\u57df\uff0c\u4ee5\u4fbf\u53ea\u6709\u6388\u6743\u7684\u5730\u5740\u548c\u7f51\u7edc\u624d\u53ef\u4ee5\u6267\u884c\u6b64\u64cd\u4f5c\u3002\u5982\u679c\u8bbe\u7f6e\u4e86\u533a\u57df\u5b89\u5168\uff0c\u5c06\u8fd4\u56de\u4ee5\u4e0b\u9519\u8bef\u6d88\u606f\uff1a<\/p>\n<p>*** Can&#8217;t list domain example.com .: Query refused<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Nslookup.exe \u7684\u7591\u96be\u89e3\u7b54<\/p>\n<p>\u9ed8\u8ba4\u670d\u52a1\u5668\u8d85\u65f6<\/p>\n<p>\u5f53\u542f\u52a8 Nslookup.exe \u5de5\u5177\u65f6\uff0c\u4ee5\u4e0b\u9519\u8bef\u53ef\u80fd\u51fa\u73b0\uff1a<\/p>\n<p>*** Can&#8217;t find server name for address w.x.y.z : Timed out<\/p>\n<p>\u5907\u6ce8\uff1a w.x.y.z \u662f\u5728\u201cDNS \u670d\u52a1\u641c\u7d22\u987a\u5e8f\u201d\u5217\u8868\u4e2d\u5217\u51fa\u7684\u7b2c\u4e00\u4e2a DNS \u670d\u52a1\u5668\u3002<\/p>\n<p>*** Can&#8217;t find server name for address 127.0.0.1: Timed out<\/p>\n<p>\u7b2c\u4e00\u4e2a\u9519\u8bef\u6307\u51fa\u4e0d\u80fd\u8fde\u63a5 DNS \u670d\u52a1\u5668\uff0c\u6216\u8005\u8be5\u8ba1\u7b97\u673a\u4e0a\u7684\u670d\u52a1\u6ca1\u6709\u8fd0\u884c\u3002\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u542f\u52a8\u8be5\u670d\u52a1\u5668\u4e0a\u7684 DNS \u670d\u52a1\uff0c\u6216\u68c0\u67e5\u53ef\u80fd\u5b58\u5728\u7684\u8fde\u63a5\u95ee\u9898\u3002<\/p>\n<p>\u7b2c\u4e8c\u4e2a\u9519\u8bef\u6307\u51fa\u5728\u201cDNS \u670d\u52a1\u641c\u7d22\u987a\u5e8f\u201d\u5217\u8868\u4e2d\u8fd8\u6ca1\u6709\u5b9a\u4e49\u670d\u52a1\u5668\u3002\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u8bf7\u5c06\u6709\u6548 DNS \u670d\u52a1\u5668\u7684 IP \u5730\u5740\u6dfb\u52a0\u5230\u6b64\u5217\u8868\u4e2d\u3002<\/p>\n<p>\u542f\u52a8 Nslookup.exe \u65f6\u627e\u4e0d\u5230\u670d\u52a1\u5668\u540d<\/p>\n<p>\u542f\u52a8 Nslookup.exe \u5de5\u5177\u65f6\uff0c\u53ef\u80fd\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n<p>*** Can&#8217;t find server name for address w.x.y.z: Non-existent domain<\/p>\n<p>\u5f53\u6ca1\u6709\u540d\u79f0\u670d\u52a1\u5668 IP \u5730\u5740\u7684 PTR \u8bb0\u5f55\u65f6\uff0c\u4f1a\u51fa\u73b0\u6b64\u9519\u8bef\u3002\u5f53 Nslookup.exe \u542f\u52a8\u65f6\uff0c\u5b83\u6267\u884c\u53cd\u5411\u641c\u7d22\uff0c\u4ee5\u5f97\u5230\u9ed8\u8ba4\u670d\u52a1\u5668\u7684\u540d\u79f0\u3002\u5982\u679c\u6ca1\u6709 PTR \u6570\u636e\uff0c\u5219\u8fd4\u56de\u6b64\u9519\u8bef\u6d88\u606f\u3002\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u8bf7\u786e\u4fdd\u53cd\u5411\u641c\u7d22\u533a\u57df\u5b58\u5728\uff0c\u5e76\u5305\u542b\u540d\u79f0\u670d\u52a1\u5668\u7684 PTR \u8bb0\u5f55\u3002<\/p>\n<p>Nslookup \u5728\u5b50\u57df\u4e0a\u65e0\u6cd5\u6267\u884c<\/p>\n<p>\u5f53\u5728\u5b50\u57df\u4e0a\u6267\u884c\u67e5\u8be2\u6216\u8fdb\u884c\u533a\u57df\u8f6c\u79fb\u65f6\uff0cNslookup \u53ef\u80fd\u8fd4\u56de\u4ee5\u4e0b\u9519\u8bef\uff1a<\/p>\n<p>*** ns.domain.com can&#8217;t find child.domain.com.: Non-existent domain<br \/>\n*** Can&#8217;t list domain child.domain.com.: Non-existent domain<\/p>\n<p>\u5728 DNS Manager \u4e2d\uff0c\u53ef\u4ee5\u5728\u4e3b\u533a\u57df\u4e0b\u6dfb\u52a0\u4e00\u4e2a\u65b0\u57df\uff0c\u8fd9\u6837\u5c31\u521b\u5efa\u4e86\u4e00\u4e2a\u5b50\u57df\u3002\u7528\u8fd9\u79cd\u65b9\u6cd5\u521b\u5efa\u5b50\u57df\u5e76\u4e0d\u4e3a\u8be5\u57df\u521b\u5efa\u4e00\u4e2a\u5355\u72ec\u7684 db \u6587\u4ef6\uff0c\u8fd9\u6837\u5728\u8be5\u57df\u8fdb\u884c\u67e5\u8be2\u6216\u5728\u8be5\u57df\u8fdb\u884c\u533a\u57df\u8f6c\u79fb\u65f6\u5c06\u4f1a\u4ea7\u751f\u4ee5\u4e0a\u9519\u8bef\u3002\u5728\u7236\u57df\u4e0a\u8fdb\u884c\u533a\u57df\u8f6c\u79fb\u65f6\u5c06\u540c\u65f6\u5217\u51fa\u7236\u57df\u6570\u636e\u548c\u5b50\u57df\u6570\u636e\u3002\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u8bf7\u5728 DNS \u670d\u52a1\u5668\u4e0a\u4e3a\u8be5\u5b50\u57df\u521b\u5efa\u4e00\u4e2a\u65b0\u4e3b\u57df\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nslookup.exe \u53ef\u4ee5\u5728\u4e24\u79cd\u6a21\u5f0f\u4e0b\u8fd0\u884c\uff1a\u4ea4\u4e92\u5f0f\u548c\u975e\u4ea4\u4e92\u5f0f\u3002\u5f53\u9700\u8981\u8fd4\u56de\u5355\u5757\u6570\u636e\u65f6\uff0c\u8bf7\u4f7f\u7528\u975e\u4ea4\u4e92\u5f0f\u6a21\u5f0f\u3002\u975e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[790,133],"_links":{"self":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts\/2343"}],"collection":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/comments?post=2343"}],"version-history":[{"count":1,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts\/2343\/revisions"}],"predecessor-version":[{"id":2344,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts\/2343\/revisions\/2344"}],"wp:attachment":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/media?parent=2343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/categories?post=2343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/tags?post=2343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}