How do applications handle IPv6 and IPv4 dual-stacked (Was: Apple Airport Extreme IPv6 problems?)
jeroen at unfix.org
Sun Sep 16 09:55:51 UTC 2007
[as this has nothing to do with Apple Airports in particular I changed
the subject again]
Martin Hannigan wrote:
> Should be an operation defined by gethostbyname() no?
and in another:
> "Pretty good" as in there is a browser standard to poke for v6 then v4
> or is this a stack behavior?
No, it is done by getaddrinfo() and the resolver layers of the OS,
please read the somewhat longer mail from with the subject of "Going
dual-stack, how do apps behave and what to do as an operator", yes it is
long, but it explains more or less how it works and answers these questions.
Andy Davidson wrote:
> On 16 Sep 2007, at 07:39, Martin Hannigan wrote:
>> On 9/15/07, Iljitsch van Beijnum <iljitsch at muada.com> wrote:
>>> Browsers are pretty good at falling back on a different address in
>>> general / IPv4 in particular when the initial try doesn't work,
>> "Pretty good" as in there is a browser standard to poke for v6 then v4
>> or is this a stack behavior?
> Since this conversation has already talked about behaviour when
> encountering AAAA vs A, I am worried that a browser running on a
> dual-stack laptop might cache the AAAA returned when it has some v6
> connectivity, and then refuse to look again for the A when I pick it up
> and take it somewhere with only v4 connectivity.
getaddrinfo() asks first for AAAA, then for A, then sorts the records
and then returns them to the application. Thus no such problem there
unless some OS implements this in the wrong way, but afaik that is not
Now indeed when you are swapping locations and thus change IP addresses
(eg loose the IPv6 connection, gain IPv4, or change from one IPv4
address to the other or one IPv6 address to another), indeed TCP
sessions will die, but that is a problem with mobility.
> We see the browser cache bite us regularly with regard to the way they
> dip into the cache for long-stale records today. The support burden
> will increase if there are stack transitionary woes as well.
Browsers should (and afaik don't) care about the IP protocol they got a
resource from, they cache based on URI "http://www.example.com/bla.png"
and do not note the IP protocol it was from.
Note that there are a couple of browsers though which have their own
internal "IPv6 off" switches, eg firefox has "network.dns.disableIPv6"
which can be turned off by the user, Safari had/has IPv6 turned off per
default and so was Opera. This as they perceived IPv6 to have problems
and thus if there is IPv4 they always first use IPv4 and then IPv6,
ignoring the ordering done by getaddrinfo().
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 311 bytes
Desc: OpenPGP digital signature
More information about the NANOG