微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

domain-name-system – 是否可以跟踪DNS查找的委派路径?

我正在尝试确定为什么 Nagios主机检查失败(主机名和IP已被更改以保护有罪):
: jmglov@laurana; host www.foo.com
;; connection timed out; no servers Could be reached

: jmglov@laurana; for ns in `grep -o '\([0-9]\+[.]\)\{3\}[0-9]\+$' /etc/resolv.conf`; do ping -qc 1 $ns; done
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.

--- 192.168.1.1 ping statistics ---
1 packets transmitted,1 received,0% packet loss,time 0ms
rtt min/avg/max/mdev = 10.911/10.911/10.911/0.000 ms
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.

--- 192.168.1.2 ping statistics ---
1 packets transmitted,time 0ms
rtt min/avg/max/mdev = 0.241/0.241/0.241/0.000 ms

所以我知道我的名字服务器是可以访问的,这意味着我的主机的权威名称服务器的委托路径中的某个名称服务器没有响应.有没有一种简单的方法来确定这是哪个名称服务器(基本上是DNS的traceroute)?

解决方法

这对你有用吗?
dig +trace google.com

从手册页:

+[no]trace Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled,dig makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers,showing the answer from each server that was used to resolve the lookup.

原文地址:https://www.jb51.cc/html/229422.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐