AAAA queries slow down normal ipv4 browsing. How can I stop ipv6 in karmic?

Asked by ndv on 2009-11-01

I have set up a BIND9 server (just apt-get install bind9) in order to have a cache only local resolver because of slow wan queries responses from our ISP. But I have also noticed that the problem in name resolution maybe rely on the AAAA queries that karmic insists to try.
We have not IPV6 and even ifconfig doesn't have a local-link or unicast or anycast ipv6 address mapped... just plain-vanilla ipv4.

how can some of you can stop this storm of nonuseful request (and timeouts?)

(from /var/log/syslog)

*********************************************
Nov 1 13:29:38 fisso named[1007]: network unreachable resolving 'ns1.easydns.com/AAAA/IN': 2001:500:1::803f:235#53
Nov 1 13:29:40 fisso named[1007]: network unreachable resolving 'ns2.penny-arcade.com/AAAA/IN': 2001:7fd::1#53
Nov 1 13:29:42 fisso named[1007]: network unreachable resolving 'www.xkcd.com/A/IN': 2001:4830:120:1::1#53
Nov 1 13:29:42 fisso named[1007]: network unreachable resolving 'ns6.easydns.net/AAAA/IN': 2001:500:1::803f:235#53
Nov 1 13:29:48 fisso named[1007]: network unreachable resolving 'everything2.com/AAAA/IN': 2001:503:231d::2:30#53
Nov 1 13:29:48 fisso named[1007]: network unreachable resolving 'everything2.com/AAAA/IN': 2001:503:a83e::2:30#53
Nov 1 13:30:21 fisso named[1007]: network unreachable resolving 'www.xkcd.com/A/IN': 2001:4830:120:1::1#53
Nov 1 13:30:35 fisso named[1007]: network unreachable resolving 'www.xkcd.com/AAAA/IN': 2001:4830:120:1::1#53
Nov 1 13:30:41 fisso named[1007]: network unreachable resolving 'everything2.com/A/IN': 2001:503:231d::2:30#53
Nov 1 13:30:52 fisso named[1007]: success resolving 'themes.freshmeat.net/AAAA' (in 'freshmeat.net'?) after reducing the advertised EDNS UDP packet size to 512 octets
Nov 1 13:30:53 fisso named[1007]: success resolving 'www.xkcd.com/AAAA' (in 'xkcd.com'?) after reducing the advertised EDNS UDP packet size to 512 octets
Nov 1 13:30:55 fisso named[1007]: network unreachable resolving 'everything2.com/AAAA/IN': 2001:503:a83e::2:30#53
Nov 1 13:30:58 fisso named[1007]: success resolving 'everything2.com/A' (in 'everything2.com'?) after reducing the advertised EDNS UDP packet size to 512 octets
Nov 1 13:30:58 fisso named[1007]: network unreachable resolving 'everything2.com/AAAA/IN': 2001:503:231d::2:30#53
Nov 1 13:30:59 fisso named[1007]: network unreachable resolving 'www.stopbadware.org/AAAA/IN': 2001:500:b::1#53
Nov 1 13:30:59 fisso named[1007]: network unreachable resolving 'www.stopbadware.org/AAAA/IN': 2001:500:f::1#53
Nov 1 13:31:00 fisso NetworkManager: Tried to set deprecated property gsm/band
Nov 1 13:31:00 fisso NetworkManager: Tried to set deprecated property gsm/band
Nov 1 13:31:13 fisso named[1007]: success resolving 'thinkgeek.com/AAAA' (in 'thinkgeek.com'?) after reducing the advertised EDNS UDP packet size to 512 octets
Nov 1 13:31:14 fisso named[1007]: success resolving 'ocsp.godaddy.com/AAAA' (in 'godaddy.com'?) after reducing the advertised EDNS UDP packet size to 512 octets
Nov 1 13:31:16 fisso named[1007]: success resolving 'sourceforge.com/AAAA' (in 'sourceforge.com'?) after disabling EDNS
*********************************************

the most clever amogst you may have noticed that the last lines says:

"success resolving 'thinkgeek.com/AAAA' (in 'thinkgeek.com'?) after reducing the advertised EDNS UDP packet size to 512 octets"

what the heck is EDNS? what the heck it takes a packet size *over 512 bytes* just for a DNS query? How can I wipe this pesky and buggy protocol from my PC and restore an old style fast and stable internet resolution.

thanks

nicola

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bind9 Edit question
Assignee:
No assignee Edit question
Solved by:
ndv
Solved:
2009-11-01
Last query:
2009-11-01
Last reply:
2009-11-01

http://www.joehacker.com/index.php?title=Ubuntu_Tips#Disable_IPv6_on_Karmic_9.10

If you also go into about:config in firefox and search for ipv6 you can disable it there too.

ndv (ndv-excite) said : #2

thanks for the reply but firefox isn't the only network service that uses DNS, but after a more deeper search i've found that in /etc/defaults/bind there is a bug:

the default value:

# startup options for the server
OPTIONS=" -u bind"

shall be changed in:

# startup options for the server
OPTIONS="-4 -u bind"

after the change (and bind restart) the ipv4 regained normal speed

Can you please submit this as a bug then suggest your fix as a resolution. This will help others too :D

Thanks for sharing your findings.

Not enough for me to solve i found it also help to put int the

/etc/bind/named.conf.options

after the options { .... };

section the rows below to disable edns:

server ::/0 {
       edns no;
};

server 0.0.0.0/0 {
       edns no;
};

and then restart the bind9

sudo /etc/init.d/bind9 restart