了解 electronics.stackexchange.com 的 DIG 输出

了解 electronics.stackexchange.com 的 DIG 输出

我正在尝试了解 DNS 的工作原理。当我这样做时dig electronics.stackexchange.com,我得到了以下响应(为简洁起见,在底部截断):

; <<>> DiG 9.10.6 <<>> electronics.stackexchange.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2941
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 13, ADDITIONAL: 27

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;electronics.stackexchange.com. IN  A

;; ANSWER SECTION:
electronics.stackexchange.com. 288 IN   A   151.101.129.69
electronics.stackexchange.com. 288 IN   A   151.101.193.69
electronics.stackexchange.com. 288 IN   A   151.101.65.69
electronics.stackexchange.com. 288 IN   A   151.101.1.69

;; AUTHORITY SECTION:
com.            96429   IN  NS  a.gtld-servers.net.
com.            96429   IN  NS  k.gtld-servers.net.
com.            96429   IN  NS  h.gtld-servers.net.
com.            96429   IN  NS  b.gtld-servers.net.
com.            96429   IN  NS  c.gtld-servers.net.
com.            96429   IN  NS  g.gtld-servers.net.
com.            96429   IN  NS  i.gtld-servers.net.
com.            96429   IN  NS  j.gtld-servers.net.
com.            96429   IN  NS  l.gtld-servers.net.
com.            96429   IN  NS  m.gtld-servers.net.
com.            96429   IN  NS  f.gtld-servers.net.
com.            96429   IN  NS  d.gtld-servers.net.
com.            96429   IN  NS  e.gtld-servers.net.

;; ADDITIONAL SECTION:
a.gtld-servers.net. 12796   IN  A   192.5.6.30
b.gtld-servers.net. 12796   IN  A   192.33.14.30
c.gtld-servers.net. 12796   IN  A   192.26.92.30
...

我们可以看到,此域名的所有权威服务器都是 TLD.com服务器。我有点惊讶,为什么stackexchange.com没有自己的权威 NS?所以我的问题是,组织这样做有什么具体的原因吗?

答案1

似乎你的 DNS 服务器返回了奇怪的答案。一个普通的 DNS 服务器会返回如下答案:

; <<>> DiG 9.11.5-P4 <<>> electronics.stackexchange.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61351
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 4, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;electronics.stackexchange.com. IN      A

;; ANSWER SECTION:
electronics.stackexchange.com. 87 IN    A       151.101.1.69
electronics.stackexchange.com. 87 IN    A       151.101.65.69
electronics.stackexchange.com. 87 IN    A       151.101.193.69
electronics.stackexchange.com. 87 IN    A       151.101.129.69

;; AUTHORITY SECTION:
stackexchange.com.      172587  IN      NS      ns-1832.awsdns-37.co.uk.
stackexchange.com.      172587  IN      NS      ns-925.awsdns-51.net.
stackexchange.com.      172587  IN      NS      ns-cloud-d1.googledomains.com.
stackexchange.com.      172587  IN      NS      ns-cloud-d2.googledomains.com.

您可以在其中查看域名服务器stackexchange.com.

相关内容