面白いので調べてみました。
tldのサーバを適当なキャッシュサーバ(Cloudflare)に問い合わせます。
% dig ns . @1.1.1.1
; <<>> DiG 9.10.6 <<>> ns . @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7437
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;. IN NS
;; ANSWER SECTION:
. 516489 IN NS a.root-servers.net.
. 516489 IN NS b.root-servers.net.
. 516489 IN NS c.root-servers.net.
. 516489 IN NS d.root-servers.net.
. 516489 IN NS e.root-servers.net.
. 516489 IN NS f.root-servers.net.
. 516489 IN NS g.root-servers.net.
. 516489 IN NS h.root-servers.net.
. 516489 IN NS i.root-servers.net.
. 516489 IN NS j.root-servers.net.
. 516489 IN NS k.root-servers.net.
. 516489 IN NS l.root-servers.net.
. 516489 IN NS m.root-servers.net.
;; Query time: 12 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Tue Oct 31 15:40:38 JST 2023
;; MSG SIZE rcvd: 239
次に、.ai
NSを聞きます。
$ dig ns ai @a.root-servers.net.
; <<>> DiG 9.10.6 <<>> ns ai @a.root-servers.net.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42260
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 8
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;ai. IN NS
;; AUTHORITY SECTION:
ai. 172800 IN NS anycastdns1-cz.nic.ai.
ai. 172800 IN NS anycastdns2-cz.nic.ai.
ai. 172800 IN NS pch.whois.ai.
ai. 172800 IN NS a.lactld.org.
;; ADDITIONAL SECTION:
anycastdns1-cz.nic.ai. 172800 IN A 185.28.194.194
anycastdns2-cz.nic.ai. 172800 IN A 185.38.108.108
anycastdns2-cz.nic.ai. 172800 IN AAAA 2a00:fea0:dead::beef
pch.whois.ai. 172800 IN A 204.61.216.123
pch.whois.ai. 172800 IN AAAA 2001:500:14:6123:ad::1
a.lactld.org. 172800 IN A 200.0.68.10
a.lactld.org. 172800 IN AAAA 2801:14:a000::10
;; Query time: 81 msec
;; SERVER: 2001:503:ba3e::2:30#53(2001:503:ba3e::2:30)
;; WHEN: Tue Oct 31 15:41:54 JST 2023
;; MSG SIZE rcvd: 291
a
レコードを問い合わせると返ってきます。
$ dig a ai @185.28.194.194
; <<>> DiG 9.10.6 <<>> a ai @185.28.194.194
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58608
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 6
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1480
;; QUESTION SECTION:
;ai. IN A
;; ANSWER SECTION:
ai. 86400 IN A 209.59.119.34
;; AUTHORITY SECTION:
ai. 86400 IN NS a.lactld.org.
ai. 86400 IN NS pch.whois.ai.
ai. 86400 IN NS anycastdns1-cz.nic.ai.
ai. 86400 IN NS anycastdns2-cz.nic.ai.
;; ADDITIONAL SECTION:
pch.whois.ai. 86400 IN A 204.61.216.123
anycastdns1-cz.nic.ai. 86400 IN A 185.28.194.194
anycastdns2-cz.nic.ai. 86400 IN A 185.38.108.108
pch.whois.ai. 86400 IN AAAA 2001:500:14:6123:ad::1
anycastdns1-cz.nic.ai. 86400 IN AAAA 2a00:fea0:dead::beef
;; Query time: 5 msec
;; SERVER: 185.28.194.194#53(185.28.194.194)
;; WHEN: Tue Oct 31 15:43:01 JST 2023
;; MSG SIZE rcvd: 263
普通は、トップレベルドメインにAレコードは登録されていないので、引けません。
$ dig a com @1.1.1.1
; <<>> DiG 9.10.6 <<>> a com @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43107
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;com. IN A
;; AUTHORITY SECTION:
com. 178 IN SOA a.gtld-servers.net. nstld.verisign-grs.com. 1698733864 1800 900 604800 86400
;; Query time: 6 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Tue Oct 31 15:43:48 JST 2023
;; MSG SIZE rcvd: 105
トップレベルドメインのネームサーバは各団体での管理に移譲されているのでこんな自由なことができてしまうんですね。