nslookup命令用法

1.查询A记录

C:\>nslookup

*** Can't find server name for address 192.168.2.1: Non-existent domain
*** Default servers are not available
Server: UnKnown
Address: 192.168.2.1

Non-authoritative answer:

Name:
Addresses: 61.129.102.61, 202.101.42.101

61.129.102.61, 202.101.42.101是WWW对应的IP地址.

2.查询MX记录

C:\>nslookup -type=mx cdnunion.com
*** Can't find server name for address 192.168.2.1: Non-existent domain
*** Default servers are not available
Server: UnKnown
Address: 192.168.2.1

Non-authoritative answer:

cdnunion.com MX preference = 8, mail exchanger = mail.cdnunion.com

cdnunion.com nameserver = ns2.cdnunion.com

mail.cdnunion.com internet address = 61.129.102.61

mail.cdnunion.com是cdnunion.com对应的MX记录.

3.查CNAME记录

C:\>nslookup -type=cname
*** Can't find server name for address 192.168.2.1: Non-existent domain
*** Default servers are not available
Server: UnKnown
Address: 192.168.2.1

Non-authoritative answer:

canonical name =

是对应的CNAME记录.

4.查询域名服务器

C:\>nslookup -type=ns cdnunion.com
*** Can't find server name for address 192.168.2.1: Non-existent domain
*** Default servers are not available
Server: UnKnown
Address: 192.168.2.1

Non-authoritative answer:

cdnunion.com nameserver = ns2.cdnunion.com

ns2.cdnunion.com internet address = 61.129.102.61

ns2.cdnunion.com是cdnunion.com域名的DNS服务器.

5.指定域名服务器查询结果.

C:\>nslookup 202.102.128.68

Server: ns.sdjnptt.net.cn
Address: 202.102.128.68

Non-authoritative answer:

Name:
Address: 210.51.25.233

202.102.128.68是山东DNS服务器IP.