IPV6 only hotspot

Hi,
I am struggling with wifi hotspot versus my ISP ipv6…
It turns out that I cannot have an IPv4 form my ISP. I tried multiple combinations, I only have an IPv6 address for wwan0 (2a04:cec0:xxxxxxx/64, reachable from outside).
I cannot setup the APN to IPv4. If I try to deactivate IPv6, mmcli will return an explicit error:

  --------------------------------------
  Status     |                connected: no
             |    connection error name: org.freedesktop.ModemManager1.Error.MobileEquipment.Ipv6OnlyAllowed
             | connection error message: IPv6 only allowed
             |                suspended: no
             |              multiplexed: no
             |               ip timeout: 20
  --------------------------------------

It seems LTE is ipv6 or nothing with this ISP.

In this configuration, if I try to activate the wifi hotspot, librem5 will set wifi to 10.42.0.1, and run a dhcp service that will affect 10.42.0.31 to my computer, with a default route to 10.42.0.1.
My computer also have an IPV6 on this interface, but a local one (fe80::xxx).

And of course this won’t work at all, because my computer to believe IPV4 is up and running.

What is the recommended setup in such a situation ?
Maybe there is something obvious to do on my computer side, but IPv6 is quite new for me.

1 Like

A /64 address makes it difficult to extend the network by normal means, given that NAT on IPv6 does/should not exist.

I don’t know if NetworkManager can do that, but the solutions are going to involve one of things described here: https://lkhill.com/ipv6-based-wi-fi-hotspots/

So the question is: can NetworkManager set up a Neighbor Discovery Proxy or RFC 7278?

Well, I solved my problem.
Let me share the solution:
Here is the trick explained on the ISP side:
https://blog.wirelessmoves.com/2020/02/ipv6-only-in-mobile-networks.html
So, this links you to https://en.wikipedia.org/wiki/IPv6_transition_mechanism#464XLAT , and this links to the only CLAT implementation for linux: CLATD : https://github.com/toreanderson/clatd

=> You just need to install clatd on your librem5
Absolutely 0 configuration… Once up and started, you have to wait a few seconds after LTE is up (in IPV6), then you can test with ping 8.8.8.8 for example. (the wait time the 10s delay in the perl script of clatd, waiting for IPv4)

And wifi hotspot is working. (I am writing this on my computer connected to internet via my librem5 with the wifi hotspot).

I can detail install if needed, but it is pretty straightforward and well documented in the https://github.com/toreanderson/clatd readme.

Just look at ip addr for fun… It is magic !

5: wwan0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/none 
    inet6 2a04:cec0:f085:1972:7776:f934:7c6c:f3da/64 scope global noprefixroute 
       valid_lft forever preferred_lft forever
8: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0e:8e:a3:2e:a6 brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.1/24 brd 10.42.0.255 scope global noprefixroute wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::cbc:80f7:ca13:552b/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
9: clat: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 500
    link/none 
    inet 192.0.0.1/32 scope global clat
       valid_lft forever preferred_lft forever
    inet6 fe80::f812:9f31:3167:f31f/64 scope link stable-privacy 
       valid_lft forever preferred_lft forever

3 Likes

Out of curiosity, is IPv6 working on the computer? If not, this is only a partial workaround, and would cause problems in some situations now and/or eventually.

Starting point was “nothing is working when connected to the hotspot”.
Now, everything works except IPv6.
I need to dive int @dcz links + understand a few thing about IPv6 to fully solve the problem and get IPV6 working on my computer too.

1 Like

Follow up:
I recently changed ISP… Now I got an IPv4 in less than a second after waking up, everything is working much better, and I do not need clatd anymore. So, if you live in France, quit Bouygues telecom and suscribe to RED.

2 Likes