Comment 7 for bug 417757

Revision history for this message
Jeroen Massar (massar) wrote : Re: [karmic regression] all network apps / browsers suffer from multi-second delays by default due to IPv6 DNS lookups

This is a problem with the DNS resolver.

This problem will occur for any DNS request which the DNS resolver does not support.
The proper solution is to fix the DNS resolver.

What happens:
 - Program is IPv6 enabled.
 - When it looks up a hostname, getaddrinfo() asks first for a AAAA record
 - the DNS resolver sees the request for the AAAA record, goes "uhmmm I dunno what it is, lets throw it away"
 - DNS client (getaddrinfo() in libc) waits for a response..... has to time out as there is no response. (THIS IS THE DELAY)
 - No records received yet, thus getaddrinfo() goes for a the A record request. This works.
 - Program gets the A records and uses those.

This does NOT only affect IPv6 (AAAA) records, it also affects any other DNS record that the resolver does not support.
Generally these resolvers are embedded into the "NAT boxes" that consumers have.

Working solution, as we are on Linux anyway: don't use the DNS resolver in the NAT box, but install eg pdns-recursor and use that.

Of course that does not fix the broken box, which might be the NAT box, or the resolvers at the ISP.
Some other people start using OpenDNS because those "work" (But that is not really true either: https://lists.dns-oarc.net/pipermail/dns-operations/2009-July/004217.html)

Note that the DNS queries go over IPv4 (transport), there is no IPv6 _connectivity_ involved here.