首页 > 技术交流 > nslookup命令的用法
nslookup命令的用法 2011-12-25
 

Nslookup 是一个监测网络中 DNS 服务器是否能正确实现域名解析的命令行工具.

1.查询A记录

C:\>nslookup www.dnsceo.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:
Name: www.dnsceo.com
Addresses: 192.168.1.3, 192.168.1.4

192.168.1.3, 192.168.1.4是WWW对应的IP地址.

2.查询MX记录
C:\>nslookup -type=mx www.dnsceo.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:
dnsceo.com MX preference = 8, mail exchanger = mail.dnsceo.com

www.dnsceo.com nameserver = ns2.dnsceo.com
mail.dnsceo.com internet address = 61.129.102.61

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

3.查CNAME记录
C:\>nslookup -type=cname dnsceo.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:
dnsceo.com canonical name = www.dnsceo.com

www.dnsceo.com是dnsceo.com对应的CNAME记录.

4.查询域名服务器
C:\>nslookup -type=ns www.dnsceo.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:
www.dnsceo.com nameserver = ns2.dnsceo.com

ns2.dnsceo.com internet address = 113.105.171.124

ns2.dnsceo.com是www.dnsceo.com域名的DNS服务器.

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

C:\>nslookup www.dnsceo.com 218.85.157.99
Server: ns-pd.online.sh.cn
Address: 202.96.209.133

Non-authoritative answer:
Name: www.dnsceo.com
Address: 222.77.182.250

上一篇:js二级分类下拉展示点击当前分页展开显示其他隐藏 下一篇:apache搭建虚拟主机,实现一个ip,多个域名(独立web)