== DNS/実装/KnotDNSresolver/a.ns.nic.cz == $ kdig -t a a.ns.nic.cz @127.0.0.3 {{{ ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 65414 ;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0 ;; QUESTION SECTION: ;; a.ns.nic.cz. IN A ;; ANSWER SECTION: a.ns.nic.cz. 1800 IN A 194.0.12.1 ;; Received 45 B ;; Time 2015-10-14 08:17:28 JST ;; From 127.0.0.3@53(UDP) in 921.1 ms }}} {{{ [plan] plan 'a.ns.nic.cz.' type 'A' [resl] => querying: '199.7.83.42' score: 10 zone cut: '.' m12n: 'cz.' type: 'NS' [iter] <= referral response, follow [resl] => querying: '194.0.12.1' score: 10 zone cut: 'cz.' m12n: 'nic.cZ.' type: 'NS' [iter] <= rcode: NOERROR [iter] <= found cut, retrying with non-minimized name [resl] => querying: '194.0.13.1' score: 10 zone cut: 'cz.' m12n: 'A.Ns.nIC.cz.' type: 'A' [iter] <= referral response, follow [resl] => querying: '193.29.206.1' score: 10 zone cut: 'nic.cz.' m12n: 'A.Ns.nIC.Cz.' type: 'A' [iter] <= rcode: NOERROR [resl] finished: 4, queries: 1, mempool: 16392 B }}} ---- $ kdig -t a b.ns.nic.cz @127.0.0.3 {{{ ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 10001 ;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0 ;; QUESTION SECTION: ;; b.ns.nic.cz. IN A ;; ANSWER SECTION: b.ns.nic.cz. 172590 IN A 194.0.13.1 ;; Received 45 B ;; Time 2015-10-14 08:20:57 JST ;; From 127.0.0.3@53(UDP) in 0.3 ms }}} {{{ [plan] plan 'b.ns.nic.cz.' type 'A' [ rc ] => satisfied from cache [iter] <= rcode: NOERROR [resl] finished: 4, queries: 1, mempool: 16392 B }}} b.ns.nic.cz A is in cache. ---- How about ns.nic.cz A. $ kdig -t a ns.nic.cz @127.0.0.3 {{{ ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 19258 ;; Flags: qr rd ra; QUERY: 1; ANSWER: 0; AUTHORITY: 1; ADDITIONAL: 0 ;; QUESTION SECTION: ;; ns.nic.cz. IN A ;; AUTHORITY SECTION: nic.cz. 1800 IN SOA a.ns.nic.cz. hostmaster.nic.cz. 1444344903 10800 3600 1209600 7200 ;; Received 76 B ;; Time 2015-10-14 08:22:46 JST ;; From 127.0.0.3@53(UDP) in 501.9 ms }}} {{{ [plan] plan 'ns.nic.cz.' type 'A' [resl] => querying: '194.0.14.1' score: 10 zone cut: 'cz.' m12n: 'nIc.cz.' type: 'NS' [iter] <= rcode: NOERROR [iter] <= found cut, retrying with non-minimized name [resl] => querying: '193.29.206.1' score: 191 zone cut: 'cz.' m12n: 'Ns.nic.Cz.' type: 'A' [iter] <= rcode: NOERROR [ pc ] => answer cached for TTL=900 [resl] finished: 4, queries: 1, mempool: 16392 B }}} ns.nic.cz is not cached. ---- == nic.cz == Query nic.cz ns first. $ kdig -t ns nic.cz @127.0.0.3 {{{ ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 26738 ;; Flags: qr rd ra; QUERY: 1; ANSWER: 3; AUTHORITY: 0; ADDITIONAL: 0 ;; QUESTION SECTION: ;; nic.cz. IN NS ;; ANSWER SECTION: nic.cz. 1800 IN NS a.ns.nic.cz. nic.cz. 1800 IN NS b.ns.nic.cz. nic.cz. 1800 IN NS d.ns.nic.cz. ;; Received 81 B ;; Time 2015-10-14 08:32:11 JST ;; From 127.0.0.3@53(UDP) in 187.6 ms }}} NS is returned in Answer Section. (Same as cz.) {{{ [plan] plan 'nic.cz.' type 'NS' [resl] => querying: '193.29.206.1' score: 168 zone cut: 'cz.' m12n: 'Nic.CZ.' type: 'NS' [iter] <= rcode: NOERROR [resl] finished: 4, queries: 1, mempool: 16392 B }}} nic.cz NS was not in cache. ---- However, they are in cache. $ kdig -t mx ns.nic.cz @127.0.0.3 {{{ ;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 23023 ;; Flags: qr rd ra; QUERY: 1; ANSWER: 0; AUTHORITY: 1; ADDITIONAL: 0 ;; QUESTION SECTION: ;; ns.nic.cz. IN MX ;; AUTHORITY SECTION: nic.cz. 1800 IN SOA a.ns.nic.cz. hostmaster.nic.cz. 1444344903 10800 3600 1209600 7200 ;; Received 76 B ;; Time 2015-10-14 08:35:50 JST ;; From 127.0.0.3@53(UDP) in 175.4 ms }}} {{{ [plan] plan 'ns.nic.cz.' type 'MX' [resl] => querying: '193.29.206.1' score: 177 zone cut: 'nic.cz.' m12n: 'ns.niC.cZ.' type: 'MX' [iter] <= rcode: NOERROR [ pc ] => answer cached for TTL=900 [resl] finished: 4, queries: 1, mempool: 16392 B }}} zone cut nic.cz !! ---- nic.cz のNSを問い合せしていない状態でやってみれば、はっきりする。 -- ToshinoriMaeno <>