I have an HTC on Verizon. I can see that when on cellular, I get both IPv6 and IPv4 addresses. Is there a way to disable v4 and use v6 ONLY?

  • What problem are you facing by having both of them? – Firelord Feb 11 '16 at 18:14
  • 2
    I'd really like to test what happens when I am on a v6 only network. How NAT64/DNS64 works, etc... – MichaelB Feb 11 '16 at 18:28

First, you cannot disable IPv4 in stock Android (without root). The good news is, you don't need to.

You can set up a v6-only network with a router (needed!) which send RAs (router advertisements), and bridge this network to a wifi access point. The RAs need to signal a default router, so the default lifetime should be unequal zero. While not strictly necessary, this avoids issues with the Chrome browser (which has same peculiar ideas about what constitutes proper IPv6 connectivity).

In addition, the RAs need to contain a GUA prefix, with A and L flags being set; the A flag needs to be set in order to trigger SLAAC. L switched on is the usual on-link setting, where devices attached to the same link are allowed to talk to each other directly (such as on Ethernet). Finally, the RA has to contain an RDNSS option also, with the GUA (!!) of a DNS server.

With this setup, you can leave out any DHCPv4 server. Android 5.x and 6.x will connect successfully, even without an IPv4 address, as long as they can SLAAC an IPv6 ULA or GUA. Yet, don't use ULAs, at least not for the DNS server, as Android 6.x doesn't accept them.

Another thing to know: if you kill the router and its RAs, with neither an IPv6 nor an IPv4 address, Android considers this network to be dead and disconnects. This can be really annoying!

Finally, please note that Android does not support DHCPv6. :)

Another way is to set up a "Brouter" that only bridges IPv6 and neither bridges nor routes IPv4. Can be done using a Raspberry Pi (even a Zero W). This is "Bridging Bad" with respect to IPv4 but passes on IPv4. Great to experiment with Android and other OSes in an IPv6-only LAN.

  • I do have root. How can I disable IPv6 then? – cweiske Feb 1 at 7:08

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.