The new bind version 9.3.6 (Redhat 5.4) try to use IPv6 transport even if the server host does not have IPv6 connectivity, resulting in slower name resolution.
Sep 2 19:43:16 cpanel named[22767]: network unreachable resolving 'ns.isc.afilias-nst.info/A/IN': 2001:500:7::79#53
To fix this you have to start the bind damon with "-4" (IPv4 only). You can add the line "OPTIONS="-4"" to /etc/sysconfig/named to do so.
******************************************************************************************************************************************************************************
DNS排错(1)
一、DNS解析IPV6错误
1、错误信息
在檢查 /var/log/messages会发现一大堆关于DNS启动过程中的错误,常會見到下列這樣的訊息:
May 20 17:14:42 postfix named[1925]: network unreachable resolving 'kernel.org/NS/IN': 2001:500:f::1#53
8 May 20 17:14:43 postfix named[1925]: network unreachable resolving 'kernel.org/NS/IN': 2001:500:e::1#53
9 May 20 17:14:43 postfix named[1925]: network unreachable resolving 'ns1.q.port80.se/A/IN': 2001:500:1::803f:235#53
10 May 20 17:14:43 postfix named[1925]: network unreachable resolving 'ns1.q.port80.se/AAAA/IN': 2001:500:1::803f:235#53
11 May 20 17:14:45 postfix named[1925]: network unreachable resolving 'ns1.q.port80.se/AAAA/IN': 2001:7fd::1#53
12 May 20 17:14:45 postfix named[1925]: network unreachable resolving 'ns1.q.port80.se/AAAA/IN': 2a01:6d0:1::1#53
May 20 20:53:47 postfix named[1925]: FORMERR resolving 'ns2.no-ip.com/AAAA/IN': 192.31.80.30#53
May 20 20:53:48 postfix named[1925]: FORMERR resolving 'ns2.no-ip.com/AAAA/IN': 192.41.162.30#5
May 20 20:53:48 postfix named[1925]: FORMERR resolving 'ns2.no-ip.com/AAAA/IN': 78.16.49.15#53
May 20 20:53:48 postfix named[1925]: FORMERR resolving 'ns2.no-ip.com/AAAA/IN': 69.65.5.106#53
May 20 20:53:48 postfix named[1925]: FORMERR resolving 'ns2.no-ip.com/AAAA/IN': 75.102.60.46#53
May 20 20:53:48 postfix named[1925]: FORMERR resolving 'ns2.no-ip.com/AAAA/IN': 75.102.59.82#53
May 20 20:53:48 postfix named[1925]: FORMERR resolving 'ns2.no-ip.com/AAAA/IN': 69.72.255.6#53
May 20 20:53:48 postfix named[1925]: FORMERR resolving 'ns3.no-ip.com/AAAA/IN': 128.8.10.90#53
即:“AAAA" 或者"2001:500:f::1",这就是IPV6,通常又不只一次,多了就会影响DNS查询的时间了,进而降低效能
2、解决方法
第一种:直接编译配置文件/etc/sysconfig/named,去除去IPv6的解析,只解析IPv4(这种方法方便,呵呵)
OPTIONS="whatever" 改为 OPTIONS="-4",注意OPTIONS选项的值可以是:whatever、-4、-6中的一个
第二种:禁用IPv6也是可以的
(1)编辑配置文件/etc/sysconfig/network,然后将NETWORKING_IPV6=YES改为NETWORKING=no
(2)关闭ip6tables这个服务
(3)向/etc/modprobe.conf文件中,添加
alias ipv6 off
alias net-pf-10 off