[CentOS] Forcing IPv4 DNS lookups first before IPv6

Mon Apr 4 14:51:40 UTC 2011
Russell Jones <rjones at eggycrew.com>

Hello!

I am having a strange issue with CentOS 5.4 that I cannot seem to solve.

Every DNS lookup results in AAAA records being requested first before A 
records. As a result, this causes a large amount of unnecessary DNS 
traffic on the network. IPv6 has been completely disabled on these servers:

/etc/modprobe.conf, ipv6 off and net-pf-10 off
/etc/sysconfig/network, NETWORKING_IPV6=no

lsmod | grep ipv6 shows the kernel module no longer loaded.


Yet watching TCP dump shows that AAAA records are requested before A 
records every time a login is requested from one of our local machines 
to another. Is there some sort of configuration directive I can use to 
force IPv4 lookups first before IPv6? Or even better, stop IPv6 lookups 
all together?