nslookup命令用法
1、查询A记录
C:\>nslookupwww.baidu.com
Server: ns1.drcnet.com.cn
Address: 202.106.127.1
Non-authoritative answer:
Name:www.a.shifen.com
Addresses: 202.108.22.5, 202.108.22.43
Aliases:www.baidu.com
202.108.22.5,202.108.22.43是www对应的IP地址
2、查询MX记录
C:\>nslookup -type=mx baidu.com
Server: ns1.drcnet.com.cn
Address: 202.106.127.1
Non-authoritative answer:
baidu.com MX preference = 10, mail exchanger = mx1.baidu.com
baidu.com nameserver = ns3.baidu.com
baidu.com nameserver = ns4.baidu.com
baidu.com nameserver = dns.baidu.com
baidu.com nameserver = ns2.baidu.com
mx1.baidu.com internet address = 61.135.163.61
dns.baidu.com internet address = 202.108.250.228
ns2.baidu.com internet address = 61.135.165.235
ns3.baidu.com internet address = 220.181.37.10
ns4.baidu.com internet address = 220.181.38.10
mx1.baidu.com是baidu.com对应的MX记录
3、查询CNAME记录
C:\>nslookup -type=cnamewww.baidu.com
Server: ns1.drcnet.com.cn
Address: 202.106.127.1
Non-authoritative answer:
www.baidu.comcanonical name =www.a.shifen.com
baidu.com nameserver = ns2.baidu.com
baidu.com nameserver = ns3.baidu.com
baidu.com nameserver = ns4.baidu.com
baidu.com nameserver = dns.baidu.com
dns.baidu.com internet address = 202.108.250.228
ns2.baidu.com internet address = 61.135.165.235
ns3.baidu.com internet address = 220.181.37.10
ns4.baidu.com internet address = 220.181.38.10
www.a.shifen.com是www.baidu.com对应的CNAME记录
4、查询域名服务器
C:\>nslookup -type=ns baidu.com
Server: ns1.drcnet.com.cn
Address: 202.106.127.1
Non-authoritative answer:
baidu.com nameserver = dns.baidu.com
baidu.com nameserver = ns2.baidu.com
baidu.com nameserver = ns3.baidu.com
baidu.com nameserver = ns4.baidu.com
dns.baidu.com internet address = 202.108.250.228
ns2.baidu.com internet address = 61.135.165.235
ns3.baidu.com internet address = 220.181.37.10
ns4.baidu.com internet address = 220.181.38.10
dns.baidu.com,ns2.baidu.com,ns3.baidu.com,ns4.baidu.com是baidu.com域名的DNS服务器
5、指定域名服务器查询结果
C:\>nslookupwww.baidu.com210.51.176.71
Server: dns1.cnc-idc.com
Address: 210.51.176.71
Non-authoritative answer:
Name:www.a.shifen.com
Addresses: 202.108.22.43, 202.108.22.5
Aliases:www.baidu.com
210.51.176.71是中国网通的DNS服务器IP