首页 > 代码库 > DNS查询指令nslookup
DNS查询指令nslookup
描述:
Nslookup指令是一个查询internet域名服务的程序。Nslookup指令有两个模式:交互式和非交互式。
交互式模式允许用户查询不同种类的主机和域名或在一个域名里输出主机列表,目的是查询域名的相关信息。
非交互式模式只被用来输出名称和主机或域名被要求的信息。
例子:
# nslookup
> www.baidu.com
Server: 172.31.0.2
Address: 172.31.0.2#53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Name: www.a.shifen.com
Address: 220.181.111.188
Name: www.a.shifen.com
Address: 220.181.112.244
# nslookup www.baidu.com
Server: 172.31.0.2
Address: 172.31.0.2#53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Name: www.a.shifen.com
Address: 220.181.112.244
Name: www.a.shifen.com
Address: 220.181.111.188
# nslookup
> set q=mx
> www.baidu.com
Server: 172.31.0.2
Address: 172.31.0.2#53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com.
Authoritative answers can be found from:
a.shifen.com
origin = ns1.a.shifen.com
mail addr = baidu_dns_master.baidu.com
serial = 1410210001
refresh = 5
retry = 5
expire = 86400
minimum = 3600
DNS查询指令nslookup