Answers:
这对bash提示很有帮助。我遇到一个问题,其中名称服务器随机超时。您需要dig实用程序,该实用程序在最小安装量下不是默认设置。您可以通过安装获得它
$ yum install bind-utils
对于Fedora / RedHat / CentOS或
$ apt install dnsutils
适用于Ubuntu / Debian
$ while true; do dig www.google.com | grep time; sleep 2; done
这将产生如下输出:
;; Query time: 2 msec
;; Query time: 1 msec
;; connection timed out; no servers could be reached
;; Query time: 1 msec
;; Query time: 53 msec
;; connection timed out; no servers could be reached
;; connection timed out; no servers could be reached
;; Query time: 2 msec
;; Query time: 5 msec
;; Query time: 3 msec
在正常连接上,查询的时间不应超过2毫秒。
sudo apt-get install namebench
namebench
...
> Sending 1 queries to 7 servers... [0/7]
> Sending 1 queries to 7 servers... [4/7]
> Sending 1 queries to 7 servers... [6/7]
> Sending 1 queries to 7 servers... [7/7]
> Saving report to /tmp/namebench_2019-08-13_1148.html
> Saving detailed results to /tmp/namebench_2019-08-13_1148.csv
> Opening /tmp/namebench_2019-08-13_1148.html
> Complete! SYS-127.0.0.53 [127.0.0.53] is the best.
Au revoir, mes amis!
并根据dns的响应速度为您提供最佳dns结果的html报告
+[no]nssearch
设置此选项后,挖掘将尝试查找包含正在查找的名称的区域的权威名称服务器,并显示每个名称服务器对该区域具有的SOA记录。