Bind

綁定反向ipv6映射,dig不回答,SERVFAIL

  • March 26, 2013

我正在使用安裝了 Bind 9 的 Fedora 17,嘗試配置 DNS,但我已經解決了一個問題:

綁定 DNS 配置,dig 命令不解析名稱

現在 ipv4 和 ipv6 映射有效,反向 ipv4 映射也有效,但問題在於反向 ipv6。在我的 named.conf 文件中有這個區域:

zone "3.1.0.0.0.0.0.0.0.0.0.2.ip6.arpa" IN {
   type master;
   file "reverse6.zone";
};

這是 reverse6.zone 文件:

$TTL 48h
$ORIGIN 3.1.0.0.0.0.0.0.0.0.0.2.ip6.arpa.
@       IN      SOA     gruppo13.labreti.it. master.gruppo13.labreti.it. (
   2013032511
   1d
   2h
   4w
   1h
)
   IN      NS      gruppo13.labreti.it.
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN  PTR gruppo13.labreti.it.
2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN  PTR dns.gruppo13.labreti.it.
8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN  PTR www.gruppo13.labreti.it.
3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN  PTR mail.gruppo13.labreti.it.

用 dig 我可以找到一個 ip6 地址,但如果我做相反的事情:

$ dig -x AAAA 2000:0:d::1

我沒有得到答案,這是探勘輸出:

; <<>> DiG 9.9.2-rl.028.23-P1-RedHat-9.9.2-5.P1.fc17 <<>> -x AAAA 2000:0:d::1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 43454
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;AAAA.in-addr.arpa.     IN  PTR

;; Query time: 17 msec
;; SERVER: 192.168.13.100#53(192.168.13.100)
;; WHEN: Tue Mar 26 14:02:39 2013
;; MSG SIZE  rcvd: 46

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 17670
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;2000:0:d::1.           IN  A

;; Query time: 13 msec
;; SERVER: 192.168.13.100#53(192.168.13.100)
;; WHEN: Tue Mar 26 14:02:39 2013
;; MSG SIZE  rcvd: 40

您的命令無效。您正在查找 的倒數AAAA

;; QUESTION SECTION:
;AAAA.in-addr.arpa.     IN  PTR

和 IPv4 地址2000:0:d::1

;; QUESTION SECTION:
;2000:0:d::1.           IN  A

你想要的是AAAA從你的命令中刪除(並修復地址):

dig -x 2000:0:13::1

這將發送正確的問題:

;; QUESTION SECTION:
;1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.3.1.0.0.0.0.0.0.0.0.0.2.ip6.arpa. IN PTR

請記住2000:0:13::12000:0:d::1

引用自:https://serverfault.com/questions/491432