MoinQ:

DNS/1/security/cookies/dig-exampleについて、ここに記述してください。

$ dig +qr -t ns inet.ad.jp @ns1.inet.ad.jp

; <<>> DiG 9.11.0-P3 <<>> +qr -t ns inet.ad.jp @ns1.inet.ad.jp
;; global options: +cmd
;; Sending:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47293
;; flags: rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 734f96b9d7f5fd26
;; QUESTION SECTION:
;inet.ad.jp.                    IN      NS

;; QUERY SIZE: 51

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47293
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 734f96b9d7f5fd263aae8e2458ee92e48e33cc1906130178 (good)
;; QUESTION SECTION:
;inet.ad.jp.                    IN      NS

;; ANSWER SECTION:
inet.ad.jp.             3600    IN      NS      ns1.inet.ad.jp.
inet.ad.jp.             3600    IN      NS      ns2.inet.ad.jp.

;; ADDITIONAL SECTION:
ns1.inet.ad.jp.         3600    IN      A       153.121.42.26
ns2.inet.ad.jp.         3600    IN      A       49.212.54.233

;; Query time: 6 msec
;; SERVER: 153.121.42.26#53(153.121.42.26)
;; WHEN: Thu Apr 13 05:49:40 JST 2017
;; MSG SIZE  rcvd: 135

cookie 部分:

734f96b9d7f5fd26
734f96b9d7f5fd263aae8e2458ee92e48e33cc1906130178
cf4dcd8b53f7b128d0acc65a58ee95463a0857392b6b1c0e
cf4dcd8b53f7b128
adb0b926bda90c784d099b5158ee97aeff84c18f01803685 (good)

返事の先頭8バイトはqueryからのコピー

1. 2

$ dig +qr -t ns try.ne.jp @ns1.inet.ad.jp

; <<>> DiG 9.11.0-P3 <<>> +qr -t ns try.ne.jp @ns1.inet.ad.jp
;; global options: +cmd
;; Sending:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10379
;; flags: rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: cf4dcd8b53f7b128
;; QUESTION SECTION:
;try.ne.jp.                     IN      NS

;; QUERY SIZE: 50

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10379
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: cf4dcd8b53f7b128d0acc65a58ee95463a0857392b6b1c0e (good)
;; QUESTION SECTION:
;try.ne.jp.                     IN      NS

;; ANSWER SECTION:
try.ne.jp.              3600    IN      NS      ns1.inet.ad.jp.
try.ne.jp.              3600    IN      NS      ns2.inet.ad.jp.

;; ADDITIONAL SECTION:
ns1.inet.ad.jp.         3600    IN      A       153.121.42.26
ns2.inet.ad.jp.         3600    IN      A       49.212.54.233

;; Query time: 8 msec
;; SERVER: 153.121.42.26#53(153.121.42.26)
;; WHEN: Thu Apr 13 05:59:50 JST 2017
;; MSG SIZE  rcvd: 142

%dig +qr +sit -t ns nirs.go.jp @dns.nirs.go.jp ~/dnsq/cookie

; <<>> DiG 9.10.4-P6 <<>> +qr +sit -t ns nirs.go.jp @dns.nirs.go.jp
;; global options: +cmd
;; Sending:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37123
;; flags: rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: adb0b926bda90c78
;; QUESTION SECTION:
;nirs.go.jp.                    IN      NS

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37123
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: adb0b926bda90c784d099b5158ee97aeff84c18f01803685 (good)
;; QUESTION SECTION:
;nirs.go.jp.                    IN      NS

;; ANSWER SECTION:
nirs.go.jp.             180     IN      NS      dns.nirs.go.jp.
nirs.go.jp.             180     IN      NS      ns2.nirs.go.jp.

;; ADDITIONAL SECTION:
dns.nirs.go.jp.         180     IN      A       133.63.20.2
ns2.nirs.go.jp.         180     IN      A       133.63.20.12

;; Query time: 7 msec
;; SERVER: 133.63.20.2#53(133.63.20.2)
;; WHEN: Thu Apr 13 06:10:06 JST 2017
;; MSG SIZE  rcvd: 135