IPv4 complicates app code and causes battery affect
Most of in the present day’s Web visitors nonetheless makes use of IPv4, which can not present clear end-to-end connectivity to apps. IPv4 solely supplies 232 addresses – a lot lower than the variety of gadgets on in the present day’s Web – so it’s not potential to assign a public IPv4 handle to each Android system, not to mention to particular person apps or features inside a tool. So most Web customers have personal IPv4 addresses, and share a public IPv4 handle with different customers of the identical community utilizing Community Handle Translation (NAT). NAT makes it troublesome to construct superior networking apps reminiscent of video calling apps or VPNs, as a result of these types of apps have to periodically ship packets to maintain NAT classes alive (which hurts battery) and implement complicated protocols reminiscent of STUN to permit gadgets to attach to one another via NAT.
Why IPv6 hasn’t solved this downside but
The brand new model of the Web protocol, IPv6 – now utilized by about half of all Google customers – supplies just about limitless handle area and the flexibility for gadgets to make use of a number of addresses. When each system can get international IPv6 addresses, there is no such thing as a want to make use of NAT for handle sharing! However though the handle area itself is now not restricted, the present IPv6 handle task strategies used on Wi-Fi, reminiscent of SLAAC and DHCPv6 IA_NA, nonetheless have limitations.
For one factor, each SLAAC and DHCPv6 IA_NA require the community to keep up state for every particular person handle, so assigning quite a lot of IPv6 addresses to each Android system may cause scaling points on the community. This implies it’s usually not potential to assign IPv6 addresses to VMs or containers inside the system, or to wearable gadgets and different tethered gadgets linked to it. For instance, in case your app is working on a wearable system linked to an Android cellphone, or on a pill tethered to an Android cellphone that’s linked to Wi-Fi, it seemingly gained’t have IPv6 connectivity and might want to cope with the complexities and battery affect of NAT.
Moreover, we’ve heard suggestions from some customers and community operators that they want extra management over the IPv6 addresses utilized by Android gadgets. Till now, Android solely supported SLAAC, which doesn’t enable networks to assign predictable IPv6 addresses, and makes it harder to trace the mapping between IPv6 addresses and the gadgets utilizing them. This has restricted the supply of IPv6 on Android gadgets on some networks.
The answer: devoted IPv6 handle blocks with DHCPv6 PD
To beat these drawbacks, now we have added help for DHCPv6 Prefix Delegation (PD) as outlined in RFC 8415 and RFC 9762. The Android community stack can now request a devoted prefix from the community, and if it obtains a prefix, it’ll use it to acquire IPv6 connectivity. In future releases, the system will be capable of share the prefix with wearable gadgets, tethered gadgets, digital machines, and stub networks reminiscent of Thread, offering all these gadgets with international IPv6 connectivity. This really realizes the potential of IPv6 to permit end-to-end, scalable connectivity to a limiteless variety of gadgets and features, with out requiring NAT. And since the prefix is assigned by the community, community operators can use current DHCPv6 logging infrastructure to trace which system is utilizing which prefix (see RFC 9663 for steering to community operators on deploying DHCPv6 PD).
This permits networks to totally understand the potential of IPv6: gadgets preserve the flexibleness of SLAAC, reminiscent of the flexibility to make use of a virtually limitless variety of addresses, and the community maintains the manageability and accountability of a standard DHCPv6 setup. We hope that it will enable extra networks to transition to IPv6, offering apps with end-to-end IPv6 connectivity and decreasing the necessity for NAT traversal and keepalives.