We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

IPv6 Internet USB Sharing

asked 2020-01-14 14:41:00 +0200

Laurent S. gravatar image

Is there a mean to force IPv6 instead of IPv4 on the USB connection between a laptop and a Jolla device?

The Jolla device is connected to the Internet through an IPv6-friendly cellular network. This is confirmed by visiting test-ipv6.com. I would like to share this IPv6 connection with my laptop. Henceforth, I activated Internet USB sharing. However, the sharing occurs through IPv4 in the 172.16.0.0/12 network prefix. My question is thus, how to force IPv6 over the USB sharing link, so as to enjoy IPv6 end-to-end?

Thanks in advance for your tips, LS

edit retag flag offensive close delete

Comments

You would need to set up a whole another network configuration stack. Sailfish default firewall rules block DHCPv6, thus breaking stateful IPv6 configuration, so you won't get delegation prefix. Even if you add allow rule to firewall, connman does not support DHCPv6, and if you use additional dhcp client for ipv6, something from sailfish immediately sends dhcpv6-release messages, and unbinds all gotten prefixes.

The only easy way to have ipv6 connectivity for tethering clients is to setup vpn server on the phone.

UPD: It's connman, who's sending dhcpv6-release, if interface configured by connman, you cannot use other configuration tools on it. And connman supports DHCPv6, but can't be configured to prefer it over SLAAC.

0xe4524ffe ( 2020-01-14 23:38:03 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-01-14 19:39:09 +0200

ibins gravatar image

updated 2020-01-14 19:40:38 +0200

There are more obstacles involved than only the OS on the phone. A lot of Internet providers already give you dual stack (IPv4 and IPv6), so your phone can participate in IPv6 internet. Unfortunatelly I do not know any mobile Internet provider, which gives you an IPv6 prefex instead of only one single IPv6 address, when you connect to the mobile phone. This is mostly because of a still missing spec from 3GPP, which should specify, how prefixes are distributed.

So your phone can already connect to the internet. When you want the phone to act like a router, so you can distribute your own IPv6 net to the devices connected to your phone, you would need more than just a single IPv6 address: you would need a prefex, from which you could create a net (prefix delegation).

If this were achived, you could start a DHCPv6 server or a router advertiser on the phone, that would distribute IPv6 addresses with this global prefix.

Despite this prefix not coming from the providers, there are some ideas to compensate the lack of the prefix: - „64share“ (RFC 7278). If anyone knows a working modem, please report about this! - IPv6 NAT (blaaargh): Not really - come on! - Setting up a IPv6 capable VPN (like OpenVPN or IPsec): You would only need a router advertiser or a DHCPv6 server on your phone

If you only want to distribute a net with IPv6 addresses, that are not globally valid (ULAs), then you can do it already now. Some time ago I cross compiled the radvd vor Sailfish.

edit flag offensive delete publish link more
0

answered 2020-01-14 20:28:24 +0200

DrYak gravatar image

What do your IPv6 address look like ?

Depending on the way the IPv6 is handled at your ISP, it might be doable.

If IPv6 is done by having a single common(*) /64 prefix used by the cell service provider sent by RA (router advertisement) to the phone and the phone then subsequently using autoconfiguration (SLAAC State Less Address AutoConfiguration) (i.e.: adding its own Mac address-derived suffix or a random one).

Then you could use IPv6 Neighbourhood Discovery (ND) Proxy to make the IPv6 hosts on the local network (the Wifi and USB shared connection) visible on the wide network (the Modem connection) and simple routing to forward these various IPv6 accross the network.

If you want multiple devices (e.g.: Wifi and USB or multiple Wifi devices), you could come up with your own prefix that is a subset (e.g.: a /96 subset that is a subset of the /64 used on the ISP's network) and then run DHCPv6 on the Wifi/USB side, while still using NDProxy to make them visible on the outside and routing the traffic.

At one of my previous university jobs, I did deploy something along this lines to make a coupld of LXC containers on an internal bridge (not connected to ethernet, using its own Ipv4) visible to the uni's network on IPv6. (I used firewalld and dnsmasq for that).


(*) - Note this is similar of how you'll get IPv6 when connecting to some University wifi (Where your smartphone IPv6 is [Uni's prefix] + [SLAAC suffix selected by your phone]

And different to the suggestion of ibins where the cell service provider should give you a whole prefix to your phone (e.g.: each single smartphone gets its own specific /96 that exclusive to the phone and can be free to distribute the remaining /32 suffix freely, e.g.: by running DHCPv6) (or even getting a /56 prefix from the service provider that can be then split in multiple networks each supporting SLAAC - one sub /64 for your phone, one sub /64 for your shared devices, etc.).

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2020-01-14 14:41:00 +0200

Seen: 930 times

Last updated: Jan 14 '20