nslookup 命令:用于查找域名服务器的程序,nslookup有两种模式:交互和非交互
a,最简单的方法
[root@rudder ~]# nslookup baidu.com Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: Name: baidu.com Address: 123.125.114.144 Name: baidu.com Address: 220.181.111.85 Name: baidu.com Address: 220.181.111.86nslookup,交互方式,查看dns
[root@rudder ~]# nslookup > www.baidu.com Server: 172.17.0.254 Address: 172.17.0.254#53 Non-authoritative answer: #非权威答案,表明是在缓存中读取的 www.baidu.com canonical name = www.a.shifen.com. Name: www.a.shifen.com Address: 61.135.169.105 #返回第一个IP地址 Name: www.a.shifen.com Address: 61.135.169.125 #返回第二个IP地址 > server 8.8.8.8 #设置域名服务器为 8.8.8.8 Default server: 8.8.8.8 Address: 8.8.8.8#53 > www.baidu.com #再次请求百度的IP地址 Server: 8.8.8.8 Address: 8.8.8.8#53 Non-authoritative answer: www.baidu.com canonical name = www.a.shifen.com. Name: www.a.shifen.com Address: 220.181.111.147 #不同的DNS获取的IP地址是不同的。
评论(0)
暂无评论