语法
nslookup [-SubCommand ...] [{ComputerToFind| [-Server]}]
参数
-SubCommand ...
将一个或多个 nslookup 子命令指定为命令行选项。
ComputerToFind
如果未指定其它服务器,就使用当前默认 DNS 名称服务器查阅 ComputerToFind 的信息。要查找不在当前 DNS 域的计算机,请在名称上附加句点。
-Server
指定将该服务器作为 DNS 名称服务器使用。如果省略了 -Server,将使用默认的 DNS 名称服务器。
{help|?}
显示 nslookup 子命令的简短总结。
例子
查询域名A记录是否生效
命令格式:nslookup domain
C:UsersAdministrator>nslookup 111cn.net
服务器: 20130000-0000.lan
Address: 192.168.1.1
非权威应答:
名称: 111cn.net
Address: 114.215.187.51
查询域名的MX记录是否生效
命令格式:nslookup -qt=mx domain
C:UsersAdministrator>nslookup -qt=mx 111cn.net
服务器: 20130000-0000.lan
Address: 192.168.1.1
非权威应答:
111cn.net MX preference = 10, mail exchanger = mxbiz2.qq.com
111cn.net MX preference = 5, mail exchanger = mxbiz1.qq.com
111cn.net nameserver = f1g1ns1.dnspod.net
111cn.net nameserver = f1g1ns2.dnspod.net
mxbiz1.qq.com internet address = 113.108.16.61
mxbiz1.qq.com AAAA IPv6 address = 240e:ff:f040:28::c
mxbiz2.qq.com internet address = 113.108.16.61
mxbiz2.qq.com AAAA IPv6 address = 240e:ff:f040:28::c
f1g1ns1.dnspod.net internet address = 180.153.9.189
f1g1ns1.dnspod.net internet address = 182.140.167.166
f1g1ns1.dnspod.net internet address = 183.60.52.217
f1g1ns1.dnspod.net internet address = 119.167.195.3
f1g1ns2.dnspod.net internet address = 112.90.143.29
f1g1ns2.dnspod.net internet address = 122.225.217.191
f1g1ns2.dnspod.net internet address = 180.153.162.150
f1g1ns2.dnspod.net internet address = 182.140.167.188
查询域名所用的NS服务器
命令格式:nslookup -qt=ns domain
C:UsersAdministrator>nslookup -qt=ns 111cn.net
服务器: 20130000-0000.lan
Address: 192.168.1.1
非权威应答:
111cn.net nameserver = f1g1ns1.dnspod.net
111cn.net nameserver = f1g1ns2.dnspod.net
f1g1ns1.dnspod.net internet address = 182.140.167.166
f1g1ns1.dnspod.net internet address = 183.60.52.217
f1g1ns1.dnspod.net internet address = 119.167.195.3
f1g1ns1.dnspod.net internet address = 180.153.9.189
f1g1ns2.dnspod.net internet address = 112.90.143.29
f1g1ns2.dnspod.net internet address = 122.225.217.191
f1g1ns2.dnspod.net internet address = 180.153.162.150
f1g1ns2.dnspod.net internet address = 182.140.167.188
查询域名的CNAME别名记录
命令格式:nslookup -qt=cname domain
C:UsersAdministrator>nslookup -qt=cname www.111cn.net
服务器: 20130000-0000.lan
Address: 192.168.1.1
非权威应答:
www.111cn.net canonical name = 111cn.net
111cn.net nameserver = f1g1ns1.dnspod.net
111cn.net nameserver = f1g1ns2.dnspod.net
f1g1ns1.dnspod.net internet address = 119.167.195.3
f1g1ns1.dnspod.net internet address = 180.153.9.189
f1g1ns1.dnspod.net internet address = 182.140.167.166
f1g1ns1.dnspod.net internet address = 183.60.52.217
f1g1ns2.dnspod.net internet address = 112.90.143.29
f1g1ns2.dnspod.net internet address = 122.225.217.191
f1g1ns2.dnspod.net internet address = 180.153.162.150
f1g1ns2.dnspod.net internet address = 182.140.167.188