我们假设我正在尝试找出superuser.com的委托子域名
当我执行dig + trace时,我得到了这个结果:
dig +trace superuser.com A
; <<>> DiG 9.2.1 <<>> +trace superuser.com A
;; global options: printcmd
. 6245 IN NS g.root-servers.net.
. 6245 IN NS j.root-servers.net.
. 6245 IN NS k.root-servers.net.
. 6245 IN NS m.root-servers.net.
. 6245 IN NS l.root-servers.net.
. 6245 IN NS f.root-servers.net.
. 6245 IN NS c.root-servers.net.
. 6245 IN NS e.root-servers.net.
. 6245 IN NS a.root-servers.net.
. 6245 IN NS b.root-servers.net.
. 6245 IN NS h.root-servers.net.
. 6245 IN NS i.root-servers.net.
. 6245 IN NS d.root-servers.net.
;; Received 505 bytes from x.x.x.x#53(x.x.x.x) in 1 ms
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS m.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
;; Received 491 bytes from 192.x.x.x#53(g.root-servers.net) in 231 ms
superuser.com. 172800 IN NS ns-245.awsdns-30.com.
superuser.com. 172800 IN NS ns-1699.awsdns-20.co.uk.
superuser.com. 172800 IN NS ns-cloud-d1.googledomains.com.
superuser.com. 172800 IN NS ns-cloud-d2.googledomains.com.
;; Received 269 bytes from 192.y.y.y#53(e.gtld-servers.net) in 137 ms
superuser.com. 300 IN A 151.x.x.x
superuser.com. 300 IN A 151.y.z.a
superuser.com. 300 IN A 151.y.1.a
superuser.com. 300 IN A 151.y.z.b
superuser.com. 172800 IN NS ns-1699.awsdns-20.co.uk.
superuser.com. 172800 IN NS ns-245.awsdns-30.com.
superuser.com. 172800 IN NS ns-cloud-d1.googledomains.com.
superuser.com. 172800 IN NS ns-cloud-d2.googledomains.com.
;; Received 229 bytes from 205.z.z.z#53(ns-245.awsdns-30.com) in 15 ms
l.gtld-servers.net
e.gtld-servers.net
b.gtld-servers.net
ISP如何解决需要查询哪些根服务器?在这里它选择了g.root-servers.net。这是随机的吗?类似的逻辑是否也适用于通用顶级域名?
关于这个一般性话题,这个问题有一个非常深入的答案 - superuser.com/q/527116/302907
—
Anaksunaman