centos dns 伺服器出現 error (network unreachable) resolving XXXX 一個ipv6的IP
錯誤訊息如下,代表有用戶想要透過伺服器查詢ipv6的位址,但是我們並沒有提供
Jan 9 13:27:36 localhost named-sdb[5246]: error (network unreachable) resolving 'google.com.hk/DS/IN': 2001:dca:4000::cb77:2da#53
調整設定告訴 named 我們只提供 ipv4 的服務,並重啟服務以生效設定
* echo 'OPTIONS="-4"' >> /etc/sysconfig/named
* service named restart
額外補充,自己要查ipv6的位址,可以在dig fqdn後加上AAAA參考如下所示
> [root@localhost]# dig www.google.com AAAA
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.3 <<>> www.google.com AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64942
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.google.com. IN AAAA
;; ANSWER SECTION:
www.google.com. 292 IN AAAA 2404:6800:4005:807::2004
;; Query time: 15 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Jan 9 15:18:08 2017
;; MSG SIZE rcvd: 60
Jan 9 13:27:36 localhost named-sdb[5246]: error (network unreachable) resolving 'google.com.hk/DS/IN': 2001:dca:4000::cb77:2da#53
調整設定告訴 named 我們只提供 ipv4 的服務,並重啟服務以生效設定
* echo 'OPTIONS="-4"' >> /etc/sysconfig/named
* service named restart
額外補充,自己要查ipv6的位址,可以在dig fqdn後加上AAAA參考如下所示
> [root@localhost]# dig www.google.com AAAA
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.3 <<>> www.google.com AAAA
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64942
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.google.com. IN AAAA
;; ANSWER SECTION:
www.google.com. 292 IN AAAA 2404:6800:4005:807::2004
;; Query time: 15 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Jan 9 15:18:08 2017
;; MSG SIZE rcvd: 60
留言
張貼留言