Does IPv6 Actually Work?

All of my GL-iNet devices (all on their latest respective SW), can get IPv6 addresses on their WAN ports and can assign same on the LAN ports. But even on the router itself, I don’t have connectivity. What am I missing?

Here’s some examples from my Opal:

root@GL-SFT1200:~# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:A0:C6:00:00:00
          inet addr:26.124.202.187  Bcast:255.255.255.255  Mask:255.255.255.255
          inet6 addr: fe80::2a0:c6ff:fe00:0/64 Scope:Link
          inet6 addr: 2607:fb90:4ae5:aa1f:2a0:c6ff:fe00:0/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:296359 errors:0 dropped:56 overruns:0 frame:0
          TX packets:280044 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:342192707 (326.3 MiB)  TX bytes:221139940 (210.8 MiB)
root@GL-SFT1200:~# ifconfig br-lan
br-lan    Link encap:Ethernet  HWaddr 94:83:C4:16:96:BD
          inet addr:192.168.8.1  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fe80::9683:c4ff:fe16:96bd/64 Scope:Link
          inet6 addr: fd60:1cc9:37a5::1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:298004 errors:0 dropped:0 overruns:0 frame:0
          TX packets:311932 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:207997160 (198.3 MiB)  TX bytes:353889777 (337.4 MiB)
root@GL-SFT1200:~# route -Ainet6
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
::/0                                        fe80::e9f0:54ea:deaf:5f0e               UG    512    2      268 eth1
2607:fb90:4ae5:aa1f:828:515f:86f5:abf5/128  ::                                      U     1024   1        0 eth1
2607:fb90:4ae5:aa1f:60b5:e396:ade0:26b/128  ::                                      U     1024   5      313 eth1
2607:fb90:4ae5:aa1f:747f:b435:9121:8002/128 ::                                      U     1024   1        0 eth1
2607:fb90:4ae5:aa1f:d213:fc66:3677:b0b8/128 ::                                      U     1024   1        0 eth1
2607:fb90:4ae5:aa1f::/64                    ::                                      U     256    1        0 eth1
fd60:1cc9:37a5::/64                         ::                                      U     1024   1        0 br-lan
fd60:1cc9:37a5::/48                         ::                                      !n    2147483647 1        0 lo
fe80::/64                                   ::                                      U     256    1        0 eth0
fe80::/64                                   ::                                      U     256    2        3 br-lan
fe80::/64                                   ::                                      U     256    5      104 eth1
fe80::/64                                   ::                                      U     256    1        0 eth0.2
fe80::/64                                   ::                                      U     256    1        0 wlan1
fe80::/64                                   ::                                      U     256    1        0 wlan0
::/0                                        fe80::e9f0:54ea:deaf:5f0e               UGDA  1024   5     1391 eth1
::/0                                        ::                                      !n    -1     1     3926 lo
::1/128                                     ::                                      Un    0      6      148 lo
2607:fb90:4ae5:aa1f::/128                   ::                                      Un    0      2        0 eth1
2607:fb90:4ae5:aa1f:2a0:c6ff:fe00:0/128     ::                                      Un    0      6     4314 eth1
fd60:1cc9:37a5::/128                        ::                                      Un    0      2        0 br-lan
fd60:1cc9:37a5::1/128                       ::                                      Un    0      6      726 br-lan
fe80::/128                                  ::                                      Un    0      2        0 br-lan
fe80::/128                                  ::                                      Un    0      2        0 eth0
fe80::/128                                  ::                                      Un    0      2        0 eth1
fe80::/128                                  ::                                      Un    0      2        0 eth0.2
fe80::/128                                  ::                                      Un    0      2        0 wlan1
fe80::/128                                  ::                                      Un    0      2        0 wlan0
fe80::2a0:c6ff:fe00:0/128                   ::                                      Un    0      3       33 eth1
fe80::9683:c4ff:fe16:96bc/128               ::                                      Un    0      2        0 eth0
fe80::9683:c4ff:fe16:96bc/128               ::                                      Un    0      2        0 eth0.2
fe80::9683:c4ff:fe16:96bd/128               ::                                      Un    0      3       15 br-lan
fe80::9683:c4ff:fe16:96be/128               ::                                      Un    0      2        0 wlan1
fe80::9683:c4ff:fe16:96bf/128               ::                                      Un    0      2        0 wlan0
ff00::/8                                    ::                                      U     256    2       15 eth0
ff00::/8                                    ::                                      U     256    5      456 br-lan
ff00::/8                                    ::                                      U     256    5      401 eth1
ff00::/8                                    ::                                      U     256    3       27 eth0.2
ff00::/8                                    ::                                      U     256    2       15 wlan1
ff00::/8                                    ::                                      U     256    2       15 wlan0
::/0                                        ::                                      !n    -1     1     3926 lo

root@GL-SFT1200:~# ping6 -n www.google.com
PING www.google.com (2607:f8b0:4005:808::2004): 56 data bytes
^C
www.google.com ping statistics —
6 packets transmitted, 0 packets received, 100% packet loss

Let me know if you need more info. My clients get an address in the address range of my WAN.

Screenshot_20220224_193908001
Screenshot_20220224_193839001

In my Opal, ipv6 works fine.

Can you make sure your ISP supports ipv6 access?



image

root@GL-SFT1200:~# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 82:0C:67:A1:CD:13
inet addr:172.20.10.2 Bcast:172.20.10.15 Mask:255.255.255.240
inet6 addr: fe80::800c:67ff:fea1:cd13/64 Scope:Link
inet6 addr: 2409:8954:3058:956:800c:67ff:fea1:cd13/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:587 errors:0 dropped:8 overruns:0 frame:0
TX packets:598 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:106228 (103.7 KiB) TX bytes:65167 (63.6 KiB)

root@GL-SFT1200:~# route -Ainet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
::/0 fe80::1c0f:223c:b2fc:9f26 UG 512 3 5 eth1
2409:8954:3058:956:655d:c3e0:4f26:e9ba/128 :: U 1024 1 0 br-lan
2409:8954:3058:956::/64 :: U 256 1 0 eth1
fde2:4eec:c200::/64 :: U 1024 1 0 br-lan
fde2:4eec:c200::/48 :: !n 2147483647 1 0 lo
fe80::/64 :: U 256 1 0 eth0
fe80::/64 :: U 256 2 2 br-lan
fe80::/64 :: U 256 5 87 eth1
fe80::/64 :: U 256 1 0 eth0.2
fe80::/64 :: U 256 1 0 wlan1
fe80::/64 :: U 256 1 0 wlan0
::/0 fe80::1c0f:223c:b2fc:9f26 UGDA 1024 4 42 eth1
::/0 :: !n -1 1 266 lo
::1/128 :: Un 0 6 121 lo
2409:8954:3058:956::/128 :: Un 0 2 0 eth1
2409:8954:3058:956:800c:67ff:fea1:cd13/128 :: Un 0 5 16 eth1
fde2:4eec:c200::/128 :: Un 0 2 0 br-lan
fde2:4eec:c200::1/128 :: Un 0 4 6 br-lan
fe80::/128 :: Un 0 2 0 eth0
fe80::/128 :: Un 0 2 0 eth0.2
fe80::/128 :: Un 0 2 0 br-lan
fe80::/128 :: Un 0 2 0 eth1
fe80::/128 :: Un 0 2 0 wlan1
fe80::/128 :: Un 0 2 0 wlan0
fe80::7aa6:83ff:feb2:4367/128 :: Un 0 2 0 eth0.2
fe80::800c:67ff:fea1:cd13/128 :: Un 0 4 48 eth1
fe80::9683:c4ff:fe12:59dc/128 :: Un 0 2 0 eth0
fe80::9683:c4ff:fe12:59dd/128 :: Un 0 3 1 br-lan
fe80::9683:c4ff:fe12:59de/128 :: Un 0 2 0 wlan1
fe80::9683:c4ff:fe12:59df/128 :: Un 0 2 0 wlan0
ff00::/8 :: U 256 2 15 eth0
ff00::/8 :: U 256 5 247 br-lan
ff00::/8 :: U 256 5 85 eth1
ff00::/8 :: U 256 3 15 eth0.2
ff00::/8 :: U 256 2 14 wlan1
ff00::/8 :: U 256 2 14 wlan0
::/0 :: !n -1 1 266 lo
root@GL-SFT1200:~# ping6 -n www.gitlab.com
PING www.gitlab.com (2606:4700:90:0:f22e:fbec:5bed:a9b9): 56 data bytes
64 bytes from 2606:4700:90:0:f22e:fbec:5bed:a9b9: seq=0 ttl=48 time=302.987 ms
64 bytes from 2606:4700:90:0:f22e:fbec:5bed:a9b9: seq=1 ttl=48 time=422.004 ms
64 bytes from 2606:4700:90:0:f22e:fbec:5bed:a9b9: seq=2 ttl=48 time=381.193 ms
64 bytes from 2606:4700:90:0:f22e:fbec:5bed:a9b9: seq=3 ttl=48 time=340.139 ms
64 bytes from 2606:4700:90:0:f22e:fbec:5bed:a9b9: seq=4 ttl=48 time=299.514 ms

… come on … of course they do. You see I got a global address:

inet6 addr: 2607:fb90:4ae5:aa1f:2a0:c6ff:fe00:0/64 Scope:Global (That’s T-Mobile USA, BTW)

Not only that, IPv6 works perfectly if I plug the hotspot into any other device. The issue is the GL-iNet SW or config.

I just got this Opal today; the only config changes I’ve made are modifying the WiFi settings, turning on the real-time traffic and installing LuCI; I’ll try wiping it clean and just turning on IPv6 and see if that makes a difference.

… huh:

root@GL-SFT1200:~# ping6 www.google.com
PING www.google.com (2607:f8b0:4007:80e::2004): 56 data bytes
64 bytes from 2607:f8b0:4007:80e::2004: seq=0 ttl=114 time=54.818 ms
64 bytes from 2607:f8b0:4007:80e::2004: seq=1 ttl=114 time=62.106 ms
64 bytes from 2607:f8b0:4007:80e::2004: seq=2 ttl=114 time=40.190 ms
64 bytes from 2607:f8b0:4007:80e::2004: seq=3 ttl=114 time=59.195 ms
64 bytes from 2607:f8b0:4007:80e::2004: seq=4 ttl=114 time=61.118 ms

So now I’ll repeat the steps and see what’s causing the issue. I REALLY hope it’s not LuCi :frowning:

And thanks @dengxinfa for the sanity check!

OK, everyone- ignore me, I shot myself in the foot. I have the “TTL trick” (forcing the TTL of outgoing packets to 65 so they leave the hotspot with a TTL of 64 to fool providers)- thing was, doing so also broke “ping”.

So I changed the rules a bit so it doesn’t try and modify ICMP(v6), and everything seems to be OK now:

# change TCP TTL to 65 for Hotspots; gets around tethering restrictions
iptables  -t mangle -F POSTROUTING
iptables  -t mangle -A POSTROUTING -j TTL --ttl-set 65 -o eth1 ! -p icmp
ip6tables -t mangle -F POSTROUTING
ip6tables -t mangle -A POSTROUTING -j HL   --hl-set 65 -o eth1 ! -p icmpv6