linux - NSLOOKUP 困惑 : Where is it getting its information locally?

标签 linux dns nslookup

我在非本地地址上执行 nslookup,比如 Google。在我的机器上(运行 Ubuntu 12.10),我得到了这个结果:

Server:     127.0.0.1
Address:    127.0.0.1#53

Non-authoritative answer:
Name:   www.google.com
Address: 173.194.37.52
Name:   www.google.com
Address: 173.194.37.48
Name:   www.google.com
Address: 173.194.37.49
Name:   www.google.com
Address: 173.194.37.50
Name:   www.google.com
Address: 173.194.37.51

我正在努力理解这一点。我假设“非权威答案”下的地址列表是 google.com 使用的所有可能地址,但为什么它在顶部列出我的本地主机信息?另外,nslookup 是查询本地计算机还是仅查询 DNS 服务器?

我在看 this链接来解释 nslookup,但它适用于 Windows,我不确定我是否理解他们在那里做什么。

我也查阅了 man 页面,但那些只是告诉我如何使用 nslookup,而不是它背后的任何“理论”。有人介意按顺序解释 nslookup 查询的确切位置吗?最好使用示例?

我会很感激。

最佳答案

它查询 /etc/resolv.conf 告诉它的适当值。在这种情况下,它指向本地机器,这很可能充当缓存或代理 DNS 服务器。使用 netstat 找出哪个程序正在监听端口 53。

关于linux - NSLOOKUP 困惑 : Where is it getting its information locally?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13215782/

相关文章:

python - 'requests' python 库上的 DNS 超时

network-protocols - 以编程方式确定 Web 域是否可用的最有效方法?

web - DNS 查找失败 - 所有浏览器均出现错误

java - nslookup 和 Java 的 InetAddress getHostName 之间的不同结果

c - 如何在内核中获得可读密码

java - 绑定(bind)异常 : Address already in use even with unique port

linux - 汇编 x86,在字符串中的每个单词后打印新行

c# - 如何使用 C#.net 在每隔几秒/分钟内 ping 一次域?

linux bc 十六进制表示

powershell - 生成指定子网中所有DNS记录的列表