Use dual-stack (IPv4 and IPv6) on mobile data by default
Starting with SailfishOS 1.1.4.28 (Äijänpäivänjärvi), the Jolla Phone supports dual-stack mobile data connectivity (i.e., PDP context type IPV4V6
). However, to the best of my knowledge, it defaults to requesting an IPv4-only PDP context (type IP
). This means that even if the mobile network operator supports IPv6, the user will not be able to use it. This likely means that the user's performance is lower than what it could be, as several recent measurements have shown that IPv6 outperforms IPv4 in the mobile space (see for example Facebook's presentation at the V6 World Congress). This is likely because the IPv4 path is encumbered with large-scale NAT devices, while the IPv6 path is native end-to-end.
Not all mobile network operators supports dual-stack or IPv6, but this doesn't appear to be a problem. From my testing, if the phone is set up to request dual-stack connectivity, but the network operator (or more precisely the APN) only supports IPv4-only, then the phone will successfully establish an IPv4-only mobile data connection, just like what would happen if IPv4-only was requested in the first place. Similarly, if the APN only supports IPv6 (PDP context type IPV6
), a Jolla phone set up to request dual-stack will end up with IPv6-only connectivity. This is a clear improvement on the default behaviour, which would be to fail completely.
SailfishOS' current behaviour is in volation with 3GPP Release-8 (and newer), which mandates that an UE must request IPV4V6
by default. Quoting from section 5.3.1.1:
The UE sets the PDN type during the Attach procedure based on its IP stack configuration as follows:
- A UE which is IPv6 and IPv4 capable shall request for PDN type IPv4v6.
For the reasons outlined above I propose that the default behaviour is changed, so that the Jolla Phone / SailfishOS will try to request a dual-stack IPV4V6
PDP context by default, and fall back to IP
(and/or possibly IPV6
) if IPV4V6
is not available.
Since SailfishOS v1.1.6.27 (Aaslakkajärvi), users can manually change the requested PDP type to IPV4V6
. This is done in the Settings app, under Mobile network. Long-press on the connection profile under the Mobile data header, select Edit in the context menu. Here you can set Protocol to Dual
in order to make the device request an IPV4V6
PDP context. In order to revert to the default IPv4-only behaviour, set Protocol to IP
.
For the adventurous, setting Protocol to IPv6
will make the device request an IPv6-only PDP context, but be aware that because SailfishOS does not [yet] support 464XLAT, certain apps that use legacy IPv4-only programming APIs might fail to work correctly with IPv6-only connectivity.
In any case, the mobile network operator's APN needs to support the PDP types IPV4V6
or IPV6
in order for Dual
to get fully connected and provisioned with IPv6 Internet connectivity. However it would also be useful if willing users with IPv4-only mobile network operators tested Dual
, as this would help confirm my assumption that Dual
is a safe default because of SailfishOS' built-in failback to IP
. Please test and comment if it worked fine - thanks! test-ipv6.com is helpful in determining if you have IPv6 connectivity and whether or not it works correctly.
I am aware of several network operators that have deployed IPV4V6
in their mobile network (APN in brackets):
- DNA Finland [internet]
- Elisa Finland [internet]
- T-Mobile Germany [internet.t-mobile]
- IIJ Japan [iijmio.jp]
- Telenor Norway [telenor.smart]
- SK Telecom South Korea
- Tele 2 Sweden [4g.tele2.se]
- AT&T USA
- Verizon Wireless USA (the Jolla Phone can probably not connect to this network though)
- SK Telecom Vietnam
There are even more operators who have deployed single-stack IPV6
(with NAT64/DNS64 intended for use with 464XLAT):
- Orange Poland (only performs DNS64 for the hostname ipv4only.arpa, which makes 464XLAT a requirement for IPv4 Internet access)
- Mobitel Slovenia
- Si.Mobil Slovenia
- Tušmobil Slovenia
- T-Mobile USA [epc.tmobile.com]
This list is probably not exhaustive, so do comment if I've missed any operators or if you know which APNs are used for some of those listed without APN, and I'll update the post. Th*anks!
Update 2015-09-16: SailfishOS version 1.1.9.28 will still request an IPv4-only PDP context by default.
Update 2015-09-21: Added info on how 3GPP TS 23.401 Release-8 mandates IPV4V6
and how this makes SFOS violates the standard.
Update 2015-11-04: Noting the fact that SailfishOS version 2.0.0.10 Saimaa still requests IPv4-only by default. Also, added Japanese provider IIJ to the list of providers that have support IPV4V6
.
Update 2016-10-25: SailfishOS 2.0.4.14 Fiskarsinjoki now appears to request Dual
by default! Also removed a decommissioned DNS64/NAT64 APN for Telenor Norway.
So far so good, on O2 MVNO GiffGaff in the UK.
test-ipv6.com says I dont have an IPV6 address, but everything appears to work ok
r0kk3rz ( 2015-04-17 12:22:22 +0200 )edito2 germany: 'ip' and 'dual' work, 'ipv6' doesn't. When using 'dual' I only got ipv4 address according to test-ipv6.com. Will keep using 'dual' and report any issues here.
Yo ( 2015-04-17 17:26:13 +0200 )editBy using Telekom in Germany you can also use the dualstack option for getting IPv4-only. It was officially confirmed at ipv6-kongress in Frankfurt 2014. Despite the fact that the Deutsche Telekom has customer-trials(dualstack) for more than 10 months running there is no public available dualstack-apn for DT-customers. If you use the old kitkat from google then this is the way to change the settings. In Android 5.x it is similar.
http://www.thomas--schaefer.de/apn-ipv4-ipv6.html
Unfortunately the "pure" android doesn't support tethering for IPv6.
I started a petition in Germany for dualstack on mobile.
https://www.openpetition.de/petition/online/ipv6-in-die-mobilfunknetze
Dear reader of this comment, if your are from Germany, please consider to sign it. Thank you!
Thomas Schäfer
Thomas Schäfer ( 2015-04-17 20:42:09 +0200 )editToday I made the test with a trial-SIM-card from vodafone, despite vodafone uses IPv6/NAT64+464xlat, it is also possible to set apn-type to ipv4/ipv6 on a nexus 5 with android.
https://www.netztest.at/de/Opentest?O2ced773b-0d4b-4f22-b302-428946d0300a
Thomas Schäfer ( 2015-04-18 23:53:46 +0200 )editThomas, so you are saying that Vodafone Germany has an APN that supports IPv6-only (with NAT64/DNS64)? If so, could you say which APN that is, so I can add it to the list in my original message? Thanks!
tore ( 2015-04-20 11:07:08 +0200 )edit