MoinQ:

DNS/KnotResolver/d.qmail.jpについて、ここに記述してください。

d.qmail.jp が empty non-terminal である状態で a.b.c.d.qmail.jp A を問い合わせる。

 [plan] plan 'a.b.c.d.qmail.jp.' type 'A'
[resl]   => root priming query
[plan]   plan '.' type 'NS'
[resl]     => querying: '192.112.36.4' score: 10 zone cut: '.' m12n: '.' type: 'NS'
[iter]     <= rcode: NOERROR
[resl]   => querying: '198.41.0.4' score: 10 zone cut: '.' m12n: 'Jp.' type: 'NS'
[iter]   <= referral response, follow
[resl]   => querying: '203.119.1.1' score: 10 zone cut: 'jp.' m12n: 'qMaIl.JP.' type: 'NS'
[iter]   <= referral response, follow
[resl]   => querying: '14.192.44.5' score: 10 zone cut: 'qmail.jp.' m12n: 'D.QMaiL.JP.' type: 'NS'
[iter]   <= rcode: NXDOMAIN
[iter]   <= found cut, retrying with non-minimized name
[ pc ]   => answer cached for TTL=900
[resl]   => querying: '14.192.44.5' score: 58 zone cut: 'qmail.jp.' m12n: 'a.B.C.D.qmaiL.jp.' type: 'A'
[iter]   <= referral response, follow
[resl]   => querying: '14.192.44.29' score: 10 zone cut: 'a.b.c.d.qmail.jp.' m12n: 'A.b.c.d.qmaIl.jp.' type: 'A'
[iter]   <= rcode: NOERROR
[ pc ]   => answer cached for TTL=900
[resl] finished: 4, queries: 2, mempool: 16392 B

d.qmail.jp が NXDOMAIN であることが分かる。

[plan] plan 'd.qmail.jp.' type 'A'
[resl]   => querying: '14.192.44.5' score: 53 zone cut: 'qmail.jp.' m12n: 'd.QMaIL.jP.' type: 'A'
[iter]   <= rcode: NXDOMAIN
[ pc ]   => answer cached for TTL=900
[resl] finished: 4, queries: 1, mempool: 16392 B

[plan] plan 'd.qmail.jp.' type 'A'
[ pc ]   => satisfied from cache
[iter]   <= rcode: NXDOMAIN
[resl] finished: 4, queries: 1, mempool: 16392 B

ここで、毒の代わりにゾーンサーバ側では d.qmail.jp NS を定義する。

キャッシュにはd.qmail.jp が NXDOMAIN だとあるので、 c.d.qmail.jp については qmail.jp NSに問い合わせる。

[plan] plan 'c.d.qmail.jp.' type 'A'
[resl]   => querying: '14.192.44.5' score: 57 zone cut: 'qmail.jp.' m12n: 'c.D.qmAiL.jp.' type: 'A'
[iter]   <= rcode: NOERROR
[ pc ]   => answer cached for TTL=900
[resl] finished: 4, queries: 1, mempool: 16392 B

この状態で、d.qmail.jp NS がキャッシュされるかどうかを見たかったのだが、 その確認を忘れた失敗だ。(やりなおし)


$ kdig -t a a.b.c.d.qmail.jp @127.0.0.3

;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 20816
;; Flags: qr rd ra; QUERY: 1; ANSWER: 0; AUTHORITY: 1; ADDITIONAL: 0

;; QUESTION SECTION:
;; a.b.c.d.qmail.jp.            IN      A

;; AUTHORITY SECTION:
a.b.c.d.qmail.jp.       2560    IN      SOA     a.ns.a.b.c.d.qmail.jp. hostmaster.a.b.c.d.qmail.jp. 1444734355 16384 2048 1048576 2560

;; Received 86 B
;; Time 2015-10-24 16:35:20 JST
;; From 127.0.0.3@53(UDP) in 462.3 ms

$ kdig -t a d.qmail.jp @127.0.0.3

;; ->>HEADER<<- opcode: QUERY; status: NXDOMAIN; id: 1508
;; Flags: qr rd ra; QUERY: 1; ANSWER: 0; AUTHORITY: 1; ADDITIONAL: 0

;; QUESTION SECTION:
;; d.qmail.jp.                  IN      A

;; AUTHORITY SECTION:
qmail.jp.               2560    IN      SOA     f.ns.qmail.jp. hostmaster.m.qmail.jp. 1445672063 16384 2048 1048576 2560

;; Received 82 B
;; Time 2015-10-24 16:35:35 JST
;; From 127.0.0.3@53(UDP) in 61.5 ms

$ kdig -t a d.qmail.jp @127.0.0.3

;; ->>HEADER<<- opcode: QUERY; status: NXDOMAIN; id: 44505
;; Flags: qr rd ra; QUERY: 1; ANSWER: 0; AUTHORITY: 1; ADDITIONAL: 0

;; QUESTION SECTION:
;; d.qmail.jp.                  IN      A

;; AUTHORITY SECTION:
qmail.jp.               2525    IN      SOA     f.ns.qmail.jp. hostmaster.m.qmail.jp. 1445672063 16384 2048 1048576 2560

;; Received 82 B
;; Time 2015-10-24 16:36:10 JST
;; From 127.0.0.3@53(UDP) in 0.2 ms

この間に、急いで、 d.qmail.jp NS を定義しておく。 (毒のつもり)

%dnsq ns d.qmail.jp f.ns.qmail.jp                                                   ~/dnsdata
2 d.qmail.jp:
47 bytes, 1+1+0+0 records, response, authoritative, noerror
query: 2 d.qmail.jp
answer: d.qmail.jp 259200 NS a.ns.d.qmail.jp

しかし、 c.d.qmail.jp A の問い合せでは毒は入らない。 (同居させたのが失敗だ)

$ kdig -t a c.d.qmail.jp @127.0.0.3

;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 61176
;; Flags: qr rd ra; QUERY: 1; ANSWER: 0; AUTHORITY: 1; ADDITIONAL: 0

;; QUESTION SECTION:
;; c.d.qmail.jp.                IN      A

;; AUTHORITY SECTION:
d.qmail.jp.             2560    IN      SOA     a.ns.d.qmail.jp. hostmaster.d.qmail.jp. 1445672162 16384 2048 1048576 2560

;; Received 82 B
;; Time 2015-10-24 16:36:27 JST
;; From 127.0.0.3@53(UDP) in 64.1 ms