情况:
ping域名时反应速度慢,ping ip却很正常
方法一:禁用ipv6
/etc/hosts中注释ipv6相关的
vim /etc/sysconfig/networks
NETWORKING_IPV6=no
vim /etc/modprobe.d/dist.conf
alias net-pf-10 off
alias ipv6 off
chkconfig ip6tables off
reboot
test:
lsmod | grep -i ipv6 和 ifconfig | grep -i inet6
方法二:
修改centos6的参数:
echo "options single-request-reopen" >> /etc/resolve.conf