1

我使用 BIND 9.9.4 并看到以下问题。

dig 命令向我们展示了 ADDITIONAL 部分中有 2 条记录:

ADDITIONAL: 2

但它实际上只在响应中向我们显示了 1 条记录:

;; ADDITIONAL SECTION:
 dns1.example.net.  3600    IN  A   127.0.0.1

示例:来自此链接:https ://kb.isc.org/article/AA-00711/0/In-line-Signing-With-NSEC3-in-BIND-9.9-A-Walk-through.html#informer

root:/etc/namedb/keys# dig @127.0.0.1 foo.example.net any

  ; <<>> DiG 9.9.1-P1 <<>> @127.0.0.1 foo.example.net any
  ; (1 server found)
  ;; global options: +cmd
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20991
  ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 4096
  ;; QUESTION SECTION:
  ;foo.example.net.     IN  ANY

  ;; ANSWER SECTION:
  foo.example.net.  3600    IN  A   192.168.10.10

  ;; AUTHORITY SECTION:
  example.net.      86400   IN  NS  dns1.example.net.

  ;; ADDITIONAL SECTION:
  dns1.example.net. 3600    IN  A   127.0.0.1

  ;; Query time: 0 msec
  ;; SERVER: 127.0.0.1#53(127.0.0.1)
  ;; WHEN: Mon Jun 11 16:34:26 2012
  ;; MSG SIZE  rcvd: 95
4

1 回答 1

2

从技术上讲,这不是一个错误,而是令人困惑的演示。在 9.9 中,dig 开始默认打开 EDNS(0),因此响应会在附加部分中带有 OPT 记录。OPT 没有定义的文本输出格式,因此不作为记录打印;你可以告诉它的唯一方法是在顶部附近寻找它说“OPT PSEUDOSECTION”的位置。但它附加部分中的额外记录,因此您看到的计数是正确的。

如果您在 9.8 中使用“dig +edns=0”或在 9.9 中使用“dig +noedns”,则计数将匹配。

于 2013-09-27T14:35:45.803 回答