跳到主要内容

Appendix B. Example Responses (示例响应)

Appendix B. Example Responses (示例响应)

本节中的示例显示使用附录 A 中签名区域示例的响应消息.

B.1. Name Error (名称错误)

权威名称错误.NSEC3 RR 证明该名称不存在, 并且没有应该被扩展的通配符 RR.

;; Header: QR AA DO RCODE=3
;;
;; Question
a.c.x.w.example. IN A

;; Answer
;; (empty)

;; Authority

example. SOA ns1.example. bugs.x.w.example. 1 3600 300 (
3600000 3600 )
example. RRSIG SOA 7 1 3600 20150420235959 20051021000000 (
40430 example.
Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8i
q4ZLlYWfUUbbAS41pG+68z81q1xhkYAcEyHd
VI2LmKusbZsT0Q== )

;; NSEC3 RR that covers the "next closer" name (c.x.w.example)
;; H(c.x.w.example) = 0va5bpr2ou0vk0lbqeeljri88laipsfh

0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. NSEC3 1 1 12 aabbccdd (
2t7b4g4vsa5smi47k61mv5bv1a22bojr MX DNSKEY NS
SOA NSEC3PARAM RRSIG )
0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
OSgWSm26B+cS+dDL8b5QrWr/dEWhtCsKlwKL
IBHYH6blRxK9rC0bMJPwQ4mLIuw85H2EY762
BOCXJZMnpuwhpA== )

;; NSEC3 RR that matches the closest encloser (x.w.example)
;; H(x.w.example) = b4um86eghhds6nea196smvmlo4ors995

b4um86eghhds6nea196smvmlo4ors995.example. NSEC3 1 1 12 aabbccdd (
gjeqe526plbf1g8mklp59enfd789njgi MX RRSIG )
b4um86eghhds6nea196smvmlo4ors995.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
ZkPG3M32lmoHM6pa3D6gZFGB/rhL//Bs3Omh
5u4m/CUiwtblEVOaAKKZd7S959OeiX43aLX3
pOv0TSTyiTxIZg== )

;; NSEC3 RR that covers wildcard at the closest encloser (*.x.w.example)
;; H(*.x.w.example) = 92pqneegtaue7pjatc3l3qnk738c6v5m

35mthgpgcu1qg68fab165klnsnk3dpvl.example. NSEC3 1 1 12 aabbccdd (
b4um86eghhds6nea196smvmlo4ors995 NS DS RRSIG )
35mthgpgcu1qg68fab165klnsnk3dpvl.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
g6jPUUpduAJKRljUsN8gB4UagAX0NxY9shwQ
Aynzo8EUWH+z6hEIBlUTPGj15eZll6VhQqgZ
XtAIR3chwgW+SA== )

;; Additional
;; (empty)

该查询返回了三个 NSEC3 RR, 证明请求的数据不存在且没有通配符扩展适用. 通过验证 NSEC3 RR 对否定响应进行身份验证. 相应的 RRSIG 表明 NSEC3 RR 由算法 7 的 "example" DNSKEY 签名, 密钥标签为 40430. 解析器需要相应的 DNSKEY RR 才能验证此答案.

其中一个 NSEC3 RR 的所有者名称匹配最近封闭者. 其中一个 NSEC3 RR 证明不存在更长的名称. 其中一个 NSEC3 RR 证明不存在应该被扩展的通配符 RRSet. 可以通过应用第 8.3 节中的算法找到最近封闭者.

在上面的示例中, 名称 'x.w.example' 哈希为 'b4um86eghhds6nea196smvmlo4ors995'.这表明这可能是最近封闭者. 为了证明 'c.x.w.example' 和 '*.x.w.example' 不存在, 这些名称分别哈希为 '0va5bpr2ou0vk0lbqeeljri88laipsfh' 和 '92pqneegtaue7pjatc3l3qnk738c6v5m'.第一个和最后一个 NSEC3 RR 证明这些哈希的所有者名称不存在.

B.2. No Data Error (无数据错误)

"无数据" 响应.NSEC3 RR 证明该名称存在但请求的 RR 类型不存在.

;; Header: QR AA DO RCODE=0
;;
;; Question
ns1.example. IN MX

;; Answer
;; (empty)

;; Authority
example. SOA ns1.example. bugs.x.w.example. 1 3600 300 (
3600000 3600 )
example. RRSIG SOA 7 1 3600 20150420235959 20051021000000 (
40430 example.
Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8i
q4ZLlYWfUUbbAS41pG+68z81q1xhkYAcEyHd
VI2LmKusbZsT0Q== )

;; NSEC3 RR matches the QNAME and shows that the MX type bit is not set.

2t7b4g4vsa5smi47k61mv5bv1a22bojr.example. NSEC3 1 1 12 aabbccdd (
2vptu5timamqttgl4luu9kg21e0aor3s A RRSIG )
2t7b4g4vsa5smi47k61mv5bv1a22bojr.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
OmBvJ1Vgg1hCKMXHFiNeIYHK9XVW0iLDLwJN
4TFoNxZuP03gAXEI634YwOc4YBNITrj413iq
NI6mRk/r1dOSUw== )

;; Additional
;; (empty)

该查询返回了一个 NSEC3 RR, 证明请求的名称存在 ("ns1.example." 哈希为 "2t7b4g4vsa5smi47k61mv5bv1a22bojr"), 但请求的 RR 类型不存在 (NSEC3 RR 的类型代码列表中不存在类型 MX), 并且不是 CNAME (NSEC3 RR 的类型代码列表中也不存在类型 CNAME).

B.2.1. No Data Error, Empty Non-Terminal (无数据错误, 空非终结符)

由于空的非终端导致的 "无数据" 响应.NSEC3 RR 证明该名称存在但请求的 RR 类型不存在.

;; Header: QR AA DO RCODE=0
;;
;; Question
y.w.example. IN A

;; Answer
;; (empty)

;; Authority
example. SOA ns1.example. bugs.x.w.example. 1 3600 300 (
3600000 3600 )
example. RRSIG SOA 7 1 3600 20150420235959 20051021000000 (
40430 example.
Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8i
q4ZLlYWfUUbbAS41pG+68z81q1xhkYAcEyHd
VI2LmKusbZsT0Q== )

;; NSEC3 RR matches the QNAME and shows that the A type bit is not set.

ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. NSEC3 1 1 12 aabbccdd (
k8udemvp1j2f7eg6jebps17vp3n8i58h )
ji6neoaepv8b5o6k4ev33abha8ht9fgc.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
gPkFp1s2QDQ6wQzcg1uSebZ61W33rUBDcTj7
2F3kQ490fEdp7k1BUIfbcZtPbX3YCpE+sIt0
MpzVSKfTwx4uYA== )

;; Additional
;; (empty)

该查询返回了一个 NSEC3 RR, 证明请求的名称存在 ("y.w.example." 哈希为 "ji6neoaepv8b5o6k4ev33abha8ht9fgc"), 但请求的 RR 类型不存在 (NSEC3 RR 的 Type Bit Maps 字段中不存在类型 A). 请注意, 与使用 NSEC 的空非终端证明不同, 这与无数据错误相同. 此示例仅为了完整性而提及.

B.3. Referral to an Opt-Out Unsigned Zone (引用到 Opt-Out 未签名区域)

NSEC3 RR 证明没有为此委派签名任何内容. 没有证据表明未签名的委派存在.

;; Header: QR DO RCODE=0
;;
;; Question
mc.c.example. IN MX

;; Answer
;; (empty)

;; Authority
c.example. NS ns1.c.example.
NS ns2.c.example.

;; NSEC3 RR that covers the "next closer" name (c.example)
;; H(c.example) = 4g6p9u5gvfshp30pqecj98b3maqbn1ck

35mthgpgcu1qg68fab165klnsnk3dpvl.example. NSEC3 1 1 12 aabbccdd (
b4um86eghhds6nea196smvmlo4ors995 NS DS RRSIG )
35mthgpgcu1qg68fab165klnsnk3dpvl.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
g6jPUUpduAJKRljUsN8gB4UagAX0NxY9shwQ
Aynzo8EUWH+z6hEIBlUTPGj15eZll6VhQqgZ
XtAIR3chwgW+SA== )

;; NSEC3 RR that matches the closest encloser (example)
;; H(example) = 0p9mhaveqvm6t7vbl5lop2u3t2rp3tom

0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. NSEC3 1 1 12 aabbccdd (
2t7b4g4vsa5smi47k61mv5bv1a22bojr MX DNSKEY NS
SOA NSEC3PARAM RRSIG )
0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
OSgWSm26B+cS+dDL8b5QrWr/dEWhtCsKlwKL
IBHYH6blRxK9rC0bMJPwQ4mLIuw85H2EY762
BOCXJZMnpuwhpA== )

;; Additional
ns1.c.example. A 192.0.2.7
ns2.c.example. A 192.0.2.8

该查询返回了对未签名 "c.example." 区域的引用. 响应包含 "c.example" 的最近可证明封闭者为 "example", 因为 "c.example" 的哈希 ("4g6p9u5gvfshp30pqecj98b3maqbn1ck") 被第一个 NSEC3 RR 覆盖, 并且其 Opt-Out 位已设置.

B.4. Wildcard Expansion (通配符扩展)

使用包含通配符扩展的响应回答的查询. 答案部分中 RRSIG RRSet 的标签计数表明通配符 RRSet 被扩展以生成此响应, 并且 NSEC3 RR 证明区域中不存在 "下一个更接近" 的名称.

;; Header: QR AA DO RCODE=0
;;
;; Question
a.z.w.example. IN MX

;; Answer
a.z.w.example. MX 1 ai.example.
a.z.w.example. RRSIG MX 7 2 3600 20150420235959 20051021000000 (
40430 example.
CikebjQwGQPwijVcxgcZcSJKtfynugtlBiKb
9FcBTrmOoyQ4InoWVudhCWsh/URX3lc4WRUM
ivEBP6+4KS3ldA== )

;; Authority
example. NS ns1.example.
example. NS ns2.example.
example. RRSIG NS 7 1 3600 20150420235959 20051021000000 (
40430 example.
PVOgtMK1HHeSTau+HwDWC8Ts+6C8qtqd4pQJ
qOtdEVgg+MA+ai4fWDEhu3qHJyLcQ9tbD2vv
CnMXjtz6SyObxA== )

;; NSEC3 RR that covers the "next closer" name (z.w.example)
;; H(z.w.example) = qlu7gtfaeh0ek0c05ksfhdpbcgglbe03

q04jkcevqvmu85r014c7dkba38o0ji5r.example. NSEC3 1 1 12 aabbccdd (
r53bq7cc2uvmubfu5ocmm6pers9tk9en A RRSIG )
q04jkcevqvmu85r014c7dkba38o0ji5r.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
hV5I89b+4FHJDATp09g4bbN0R1F845CaXpL3
ZxlMKimoPAyqletMlEWwLfFia7sdpSzn+ZlN
NlkxWcLsIlMmUg== )

;; Additional
ai.example. A 192.0.2.9
ai.example. RRSIG A 7 2 3600 20150420235959 20051021000000 (
40430 example.
hVe+wKYMlObTRPhX0NL67GxeZfdxqr/QeR6F
tfdAj5+FgYxyzPEjIzvKWy00hWIl6wD3Vws+
rznEn8sQ64UdqA== )
ai.example. AAAA 2001:db8:0:0:0:0:f00:baa9
ai.example. RRSIG AAAA 7 2 3600 20150420235959 20051021000000 (
40430 example.
LcdxKaCB5bGZwPDg+3JJ4O02zoMBrjxqlf6W
uaHQZZfTUpb9Nf2nxFGe2XRPfR5tpJT6GdRG
cHueLuXkMjBArQ== )

该查询返回了作为通配符扩展结果生成的答案. 答案部分包含通配符 RRSet, 它像在传统 DNS 响应中一样被扩展.RRSIG Labels 字段值为 2 表明答案是通配符扩展的结果, 因为 "a.z.w.example" 名称包含 4 个标签. 这也表明 "w.example" 存在, 因此不需要匹配最近封闭者的 NSEC3 RR.

NSEC3 RR 证明没有更接近的匹配可以用于回答此查询.

B.5. Wildcard No Data Error (通配符无数据错误)

对通配符覆盖的名称的 "无数据" 响应.NSEC3 RR 证明匹配的通配符名称没有请求类型的任何 RR, 并且区域中不存在更接近的匹配.

;; Header: QR AA DO RCODE=0
;;
;; Question
a.z.w.example. IN AAAA

;; Answer
;; (empty)

;; Authority
example. SOA ns1.example. bugs.x.w.example. 1 3600 300 (
3600000 3600 )
example. RRSIG SOA 7 1 3600 20150420235959 20051021000000 (
40430 example.
Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8i
q4ZLlYWfUUbbAS41pG+68z81q1xhkYAcEyHd
VI2LmKusbZsT0Q== )

;; NSEC3 RR that matches the closest encloser (w.example)
;; H(w.example) = k8udemvp1j2f7eg6jebps17vp3n8i58h

k8udemvp1j2f7eg6jebps17vp3n8i58h.example. NSEC3 1 1 12 aabbccdd (
kohar7mbb8dc2ce8a9qvl8hon4k53uhi )
k8udemvp1j2f7eg6jebps17vp3n8i58h.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
FtXGbvF0+wf8iWkyo73enAuVx03klN+pILBK
S6qCcftVtfH4yVzsEZquJ27NHR7ruxJWDNMt
Otx7w9WfcIg62A== )

;; NSEC3 RR that covers the "next closer" name (z.w.example)
;; H(z.w.example) = qlu7gtfaeh0ek0c05ksfhdpbcgglbe03

q04jkcevqvmu85r014c7dkba38o0ji5r.example. NSEC3 1 1 12 aabbccdd (
r53bq7cc2uvmubfu5ocmm6pers9tk9en A RRSIG )
q04jkcevqvmu85r014c7dkba38o0ji5r.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
hV5I89b+4FHJDATp09g4bbN0R1F845CaXpL3
ZxlMKimoPAyqletMlEWwLfFia7sdpSzn+ZlN
NlkxWcLsIlMmUg== )

;; NSEC3 RR that matches a wildcard at the closest encloser.
;; H(*.w.example) = r53bq7cc2uvmubfu5ocmm6pers9tk9en

r53bq7cc2uvmubfu5ocmm6pers9tk9en.example. NSEC3 1 1 12 aabbccdd (
t644ebqk9bibcna874givr6joj62mlhv MX RRSIG )
r53bq7cc2uvmubfu5ocmm6pers9tk9en.example. RRSIG NSEC3 7 2 3600 (
20150420235959 20051021000000 40430 example.
aupviViruXs4bDg9rCbezzBMf9h1ZlDvbW/C
ZFKulIGXXLj8B/fsDJarXVDA9bnUoRhEbKp+
HF1FWKW7RIJdtQ== )

;; Additional
;; (empty)

该查询返回了 NSEC3 RR, 证明请求的数据不存在且没有通配符 RR 适用.

B.6. DS Child Zone No Data Error (DS 子区域无数据错误)

对错误地发送到子区域名称服务器的 QTYPE=DS 查询的 "无数据" 响应.

;; Header: QR AA DO RCODE=0
;;
;; Question
example. IN DS

;; Answer
;; (empty)

;; Authority
example. SOA ns1.example. bugs.x.w.example. 1 3600 300 (
3600000 3600 )
example. RRSIG SOA 7 1 3600 20150420235959 20051021000000 (
40430 example.
Hu25UIyNPmvPIVBrldN+9Mlp9Zql39qaUd8i
q4ZLlYWfUUbbAS41pG+68z81q1xhkYAcEyHd
VI2LmKusbZsT0Q== )

;; NSEC3 RR matches the QNAME and shows that the DS type bit is not set.

0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. NSEC3 1 1 12 aabbccdd (
2t7b4g4vsa5smi47k61mv5bv1a22bojr MX DNSKEY NS
SOA NSEC3PARAM RRSIG )
0p9mhaveqvm6t7vbl5lop2u3t2rp3tom.example. RRSIG NSEC3 7 2 3600
20150420235959 20051021000000 40430 example.
OSgWSm26B+cS+dDL8b5QrWr/dEWhtCsKlwKL
IBHYH6blRxK9rC0bMJPwQ4mLIuw85H2EY762
BOCXJZMnpuwhpA== )

;; Additional
;; (empty)

该查询返回了一个 NSEC3 RR, 表明请求由区域 "example" 的权威服务器回答.NSEC3 RR 表明存在 SOA RR, 表明此 NSEC3 RR 来自子区域的顶点, 而不是来自父区域的区域切分点. 对 "example" DS RRSet 的查询应该发送到父服务器 (在本例中为根服务器).