我知道有些人可能认为这不太有建设性,但是,我想知道为什么你不能解析 com、org、us、ru 或任何其他顶级域名?我把这当作一个学习练习,因为我对 DNS 工作原理的理解可能存在一些漏洞。例如,我试过;
nslookup com
Server: dns.server.com
Address: 123.123.123.123
*** dns.server.com cant find com: Non-existent domain
我一直认为.com
顶级域名下的所有其他站点都依赖于一个名为 的实际域名的存在com
。至少,我认为它会跟踪该.com
域名下的现有域名。 我错过了什么?
答案1
它们确实依赖于 com。 - 但它没有 A 记录,因此您无法通过这种方式查找。请尝试查找 NS 记录:
nslookup
> set type=NS
> com.
Server: 12.12.12.12
Address: 12.12.12.12#53
Non-authoritative answer:
com nameserver = b.gtld-servers.net.
com nameserver = f.gtld-servers.net.
com nameserver = j.gtld-servers.net.
com nameserver = g.gtld-servers.net.
com nameserver = k.gtld-servers.net.
com nameserver = e.gtld-servers.net.
com nameserver = l.gtld-servers.net.
com nameserver = d.gtld-servers.net.
com nameserver = i.gtld-servers.net.
com nameserver = m.gtld-servers.net.
com nameserver = a.gtld-servers.net.
com nameserver = h.gtld-servers.net.
com nameserver = c.gtld-servers.net.
Authoritative answers can be found from:
b.gtld-servers.net internet address = 192.33.14.30
b.gtld-servers.net has AAAA address 2001:503:231d::2:30
f.gtld-servers.net internet address = 192.35.51.30
j.gtld-servers.net internet address = 192.48.79.30
g.gtld-servers.net internet address = 192.42.93.30
k.gtld-servers.net internet address = 192.52.178.30
e.gtld-servers.net internet address = 192.12.94.30
l.gtld-servers.net internet address = 192.41.162.30
d.gtld-servers.net internet address = 192.31.80.30
i.gtld-servers.net internet address = 192.43.172.30
m.gtld-servers.net internet address = 192.55.83.30
a.gtld-servers.net internet address = 192.5.6.30
a.gtld-servers.net has AAAA address 2001:503:a83e::2:30
h.gtld-servers.net internet address = 192.54.112.30
c.gtld-servers.net internet address = 192.26.92.30
这将为您提供对 com 具有权威性的 gtld 服务器,并通过该服务器将您定向到域的下一组名称服务器。
如果你有 dig,请尝试dig +trace com.
,如果没有,请访问http://www.digwebinterface.com/?hostnames=com.&type=&trace=on&ns=resolver&useresolver=8.8.4.4&nameservers=它将显示从根级别(.)到为您提供 NXDOMAIN 响应的 NS 的输出和路由。
答案2
您没有遗漏任何内容。域“com”存在,但没有 A 记录。如果您查找 NS 记录(域服务器记录),则会得到结果(如预期的那样)。
; <<>> DiG 9.9.1-P2 <<>> NS com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25150
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 16
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;com. IN NS
;; ANSWER SECTION:
com. 8396 IN NS d.gtld-servers.net.
com. 8396 IN NS l.gtld-servers.net.
com. 8396 IN NS g.gtld-servers.net.
com. 8396 IN NS f.gtld-servers.net.
com. 8396 IN NS m.gtld-servers.net.
com. 8396 IN NS k.gtld-servers.net.
com. 8396 IN NS h.gtld-servers.net.
com. 8396 IN NS e.gtld-servers.net.
com. 8396 IN NS c.gtld-servers.net.
com. 8396 IN NS j.gtld-servers.net.
com. 8396 IN NS i.gtld-servers.net.
com. 8396 IN NS a.gtld-servers.net.
com. 8396 IN NS b.gtld-servers.net.
;; ADDITIONAL SECTION:
a.gtld-servers.net. 94680 IN A 192.5.6.30
a.gtld-servers.net. 94680 IN AAAA 2001:503:a83e::2:30
b.gtld-servers.net. 94680 IN A 192.33.14.30
b.gtld-servers.net. 94680 IN AAAA 2001:503:231d::2:30
c.gtld-servers.net. 94680 IN A 192.26.92.30
d.gtld-servers.net. 94680 IN A 192.31.80.30
e.gtld-servers.net. 94680 IN A 192.12.94.30
f.gtld-servers.net. 94680 IN A 192.35.51.30
g.gtld-servers.net. 94680 IN A 192.42.93.30
h.gtld-servers.net. 94680 IN A 192.54.112.30
i.gtld-servers.net. 94680 IN A 192.43.172.30
j.gtld-servers.net. 94680 IN A 192.48.79.30
k.gtld-servers.net. 94680 IN A 192.52.178.30
l.gtld-servers.net. 94680 IN A 192.41.162.30
m.gtld-servers.net. 94680 IN A 192.55.83.30
;; Query time: 35 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Aug 17 15:50:18 2012
;; MSG SIZE rcvd: 520