3

I'm using several Android devices that have Android 6.0.x and 6.0.1, and that I want to use in an IPv6 island ("private") network. The Android devices are either attached to a WiFi-to-Ethernet bridge, or some tablets even accept USB 2.0 Ethernet dongles using OTG cables. The IPv6 network has RAs signalling the IPv6 prefix to use, as well as DNS IPv6 server address, and optionally some more-specific IPv6 routes. There are neither DHCPv6 nor DHCPv4 servers available. Well, there are DHCPv6 servers in this network, but they only respond with delegated prefixes.

Unfortunately, I cannot reliably connect my Android devices to this network. For cross-checking, an ordinary Linux Raspbian-equipped Pi does immediately become connected and works correctly, using DNS and getting proper addresses.

Even when I set a static IPv4 address, my Android devices often don't correctly connect in that they don't use IPv6 DNS, albeit it is getting advertised (RFC 5006). I have to set fake IPv4 DNS server addresses to be able to set the static IPv4 parameters. But even then, the Android devices aren't properly working, either not correctly using DNS or even getting disconnected after some seconds.

What kind of IPv4 connectivity do Android devices expect?

3

So after some more testing, using an especially made Brouter using a Raspberry Pi Zero W, I now know from my tests that Android 5.x, 6.0/6.1, and 7.0 in fact do support IPv6-only networks. However, the caveat is that as soon as Android neither gets an IPv4 address nor an IPv6 global address, the network manager will declare this network unusable and will disconnect from it.

The reason why I was experiencing such disconnects was because I was connecting my Android devices to a test network, where I shut down the link-local router from time to time for fixing, and only after some delay restarted it. And during these spans without IPv6 RAs advertising global prefixes and without IPv4, Android declared my network dead and disconnected.

Some more background information gained over time:

  • Some Android versions are allergic to ULA DNS server addresses, and only deem GUAs proper. However, the same Android versions happily accept ULA prefixes. The symptom then is that these Android devices keep connected to an IPv6 network using ULAs, but cannot resolve any DNS names after some seconds. Using one of the better diagnosis apps I notice that these Android versions first learn the DNS server address, then remove it after around 15-30 seconds. It seems as if newer Android versions 7.x are less rigid in their expectations at the moment.

  • Some Android versions react allergic to documentary addresses, that is, the 2001:db8::/32 address range. They are ignoring these addresses, especially for DNS servers. More recent Android versions 7.x seem to be tolerant of using the documentary address block in networks.

In the end, the safe side is as follows, unless you can avoid especially Android 5.x, but also some 6.x releases for sure:

  • ULAs fc00::/7 are evil ;) Please note that this includes the fd00::/8 often taught as "best practice" in IPv6 courses, so be careful.
  • documentary IPv6 addresses 2001:db8::/32 are evil too.
  • stick to real global addresses, even if they're faked.
0

Since Android 5.0 IPv6-only with RFC 5006(8106) should work completely without ipv4. Do you have dns64/NAT64 implemented? Android tries to start 464xlat internally (clat). This fails without dns64/NAT64.

  • I have NAT64 running, but not 464XLAT. I'm preparing my DNS using a special scanner, as I don't have A RRs, so DNS64 doesn't make sense. – TheDiveO Jun 4 '17 at 16:24
  • Unfortunately, this does not answer my original question: what kind of IPv4 connectivity does Android and its ConnectivityManager expect in terms of IPv4 and DNS? Sureley 464XLAT ain't mandatory...? – TheDiveO Jun 5 '17 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.