North American Network Operators Group

Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical

How do applications handle IPv6 and IPv4 dual-stacked (Was: Apple Airport Extreme IPv6 problems?)

  • From: Jeroen Massar
  • Date: Sun Sep 16 05:59:00 2007
  • Openpgp: id=333E7C23

[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 <[email protected]> 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
the case.

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().

Greets,
 Jeroen

Attachment: signature.asc
Description: OpenPGP digital signature