Android – IPv4 Oddities on an IPv6-only Link

This is a follow-up to my previous post on IPv6-only connectivity in combination with DNS64 and NAT64 on Bouygues’s mobile network. One would assume that in an ideal world, the Android operating system would only query the IPv6 address of a domain name. In practice, however, this is not quite the case and different apps are behaving quite differently.

Firefox mobile, as shown in the first screenshot, queries the IPv6 address of a domain name (the DNS AAAA record) first and waits for the response from the DNS server. Then, it queries the IPv4 address of the domain name and again waits for the response. Once it knows both addresses, it chooses the IPv6 address. In effect, this wastes 30 milliseconds. Hardly noticeable, I agree, but why?

Image: Firefox IPv6-only DNS behavior

Chrome is somewhat more intelligent but not by much as shown in the second screenshot. Instead of serial AAAA and A requests it does them in parallel and receives both answers almost simultaneously. It then uses the IPv6 address it has received. No waste of time, but asking for the IPv4 address is still superfluous for an IPv6-only connection.

Image: Chrome IPv6-only behavior

Also interesting is that the two apps behave differently, perhaps they use different system calls for opening a socket connection!? There’s even apps like ‘Conversations’ that prefer the IPv4 address, which then requires XLAT on the mobile device to convert IPv4 packets to IPv6 packets that can be sent to the network. Again, no issue from a user’s point of view but from an architectural point of view, it’s hardly ideal.