For many years, I’ve been using IPv4v6 dualstack on my mobile devices to communicate over IPv6 with servers that also support it. Now T-Mobile Germany (Deutsche Telekom) has taken the next step and offers IPv6-only connectivity over which IPv4 hosts can still be reached.
In principle DNS64 works as follows: While IPv6 hosts are directly reachable from the mobile device, IPv4-only hosts are not. Instead, the DNS server returns an IPv6 address for it that contains the IPv4 address in some of its bytes. These IPv6 packets are then routed to a gateway that performs IPv6 to IPv4 NATing.
So why switch to IPv6-only in the first place you might wonder!?
Well, I like it from a user’s point of view as this pushes the Internet a step closer to IPv6 everywhere. From a network operator’s perspective the advantage is that no private IPv4 addresses need to be assigned anymore. Yes, NATing is still necessary but without private IPv4 addresses. And these have become quite a bit of overhead in recent years. The 10.x.x.x subnet has around 16 million private IP addresses, but big carriers have far more customers and hence, there are several customers in the network with the same private IPv4 address. It’s ugly and it’s a kludge. IPv4 to IPv6 XLAT with NATing at the mobile network boarder is a nice transition technology and makes a lot of things simpler in the network, as no private IPv4 addresses conflicts need to be taken care of anymore.
And For Those That Will Never Learn…
There is one more thing to take care of, however: Some apps on Android might have hard coded IPv4 addresses and don’t use DNS resolution. For these apps, the trick with DNS64 that returns an IPv6 address for an IPv4-only host does not work. The solution for this XLAT with a Client-Side Translator (CLAT). If an app opens an IPv4 socket, it is terminated locally, and the CLAT daemon translates the IPv4 address into an IPv6 address with the IPv4 address embedded in it. At the mobile network border, the reverse process is done in the same way as with DNS64. Neat!
If you are a T-Mobile Germany customer and want to try it yourself, all you have to do is to create and activate a new APN profile. The APN name to use is ‘internet.v6.telekom‘ and, of course, you have to set the APN protocol to IPv4v6 as recommended by the operator or just to IPv6, which works as well In both cases only an IPv6 address is assigned. In the Android network status screen you’ll probably still see an IPv4 address. If it’s 192.x.x.x, that’s the local IPv4 address for XLAT and was not assigned by the network. For roaming, set the APN type to IPv4. In a follow up blog post, I’ll explain why.
Note: Honor, where honor is due: The German network operator doesn’t seem to be the first to offer IPv6-only service. The Wikipedia article linked to above lists T-Mobile US and Orange Poland as two operators that have gone there already. But it’s the first one where I had an opportunity to try it for myself.