I want to connect to an IPv6 network using a 3G modem. The SIM and the modem works as I can connect to the network using my Debian desktop. With OpenWRT 18.06.2, I experience that the modem only gets a link local address. I bet that this is because on the command line of pppd I have the nodefaultroute option. However, my option file look like this:
My network configuration for the PPP interface look like this:
config interface 'WWPPP'
option proto 'ppp'
option device '/dev/ttyUSB3'
option ipv6 'auto'
option auto '0'
And this is what I get as IPv6 address:
ppp-WWPPP Link encap:Point-to-Point Protocol
inet6 addr: fe80::209f:472d:6e36:5e5c/10 Scope:Link
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:120 (120.0 B) TX bytes:626 (626.0 B)
Any help is welcome, thanks.
I think you have no chances with ppp.
You should consider to use alternatives.
Depending on the modem you may use a kind of ethernet emulation (controlled by at commands), a qmi-based setup of the connection or a mbim-based setup.
Or short: use the ModemManager
PPP is not used by the mobile operators. They use a kind of raw IP. Old devices emulated ppp. But they haven't got updated for all kinds of IPv4, IPv4v6 and IPv6.
Raw IP needs less effort. The bearer data would be redundant with ppp.
This statement may be over simplified, but it reflects my experience.
If that is true, how could I make it work with my desktop Debian? With ppp?
Yes. This was stated in the original post. So this is 100% an OpevWRT misconfiguration.
It depends on the modem, but the exact model wasn't mentioned.
Tho models, I have, don't support IPv6 over PPP.
Let me rephrase it again. I have one modem, one SIM card, and I connected it to my Debian workstation, and could connect to IPv6 Internet using the system's pppd. I put this same modem to my OpenWRT setup and things doesn't work. This is the UC20G from Quectel. The only thing changed is the OS.
This is not how the manual tells you to configure a 3G modem in OpenWrt....
I guess you need to tell the modem about the APN, and probably also the context type to get Ipv6. See
Like Thomas I am a bit surprised to hear that this modem firmware supports IPv6 over PPP. I believe that's a pretty unusual configuration for a 3G or LTE modem. Maybe you could share some details from your Debian desktop setup? It would help to see how this actually works. How is the modem assigning addresses to the host? RA with prefix announcement or DHCPv6? IIRC, IPV6CP will only negoatiate an interface identifier so there must be some other addressing protocol running
Ok, thak you for your answer. My Debian setup is pretty out of the box. Stock kernel, stock pppd. I conducted some deep research what is (not) happening in the OpenWRT, and you are right. What I get is an RA from the peer, which is not handled by OpenWRT.
Frame 363: 110 bytes on wire (880 bits), 110 bytes captured (880 bits)
[Direction: DCE->DTE (1)]
Internet Protocol Version 6, Src: fe80::60a6:aee9:4839:d200, Dst: fe80::80f9:23e1:4a7c:1c35
Internet Control Message Protocol v6
Type: Router Advertisement (134)
Checksum: 0x682f [correct]
[Checksum Status: Good]
Cur hop limit: 255
Flags: 0x40, Other configuration, Prf (Default Router Preference): Medium
Router lifetime (s): 65535
Reachable time (ms): 0
Retrans timer (ms): 0
ICMPv6 Option (Source link-layer address : 00:00:00:00:00:00)
Type: Source link-layer address (1)
Length: 1 (8 bytes)
Link-layer address: 00:00:00_00:00:00 (00:00:00:00:00:00)
ICMPv6 Option (MTU : 1500)
Type: MTU (5)
Length: 1 (8 bytes)
ICMPv6 Option (Prefix information : 2a00:1110:223:52e7::/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
1... .... = On-link flag(L): Set
.1.. .... = Autonomous address-configuration flag(A): Set
..0. .... = Router address flag(R): Not set
...0 0000 = Reserved: 0
Valid Lifetime: Infinity (4294967295)
Preferred Lifetime: Infinity (4294967295)
So I guess the missing step is that OpenWRT doesn't do the interface configuration from the given prefix, or I need DHCPv6.
You don't need DHCPv6, but I believe SLAAC is handled by
odhcp6c in OpenWrt so you do need that.
The RA looks good, and you did get a link local address (although the prefix length is bogus - yes, fe80::/10 is assigned to LL, but the prefix length is still only /64. The remaning 54 bits must be 0). So this should just have worked....
say anything useful?
Ok, thanks for your answer! Installing odhcpc and setting ipv6 to auto did the trick. It now works! Thank you again!
root@IPS-SENSFORMER-0000:~# ping 2a00:1450:400d:809::200e
PING 2a00:1450:400d:809::200e (2a00:1450:400d:809::200e): 56 data bytes
64 bytes from 2a00:1450:400d:809::200e: seq=2 ttl=57 time=541.435 ms
64 bytes from 2a00:1450:400d:809::200e: seq=3 ttl=57 time=537.449 ms
64 bytes from 2a00:1450:400d:809::200e: seq=4 ttl=57 time=544.603 ms
64 bytes from 2a00:1450:400d:809::200e: seq=5 ttl=57 time=526.258 ms
64 bytes from 2a00:1450:400d:809::200e: seq=6 ttl=57 time=484.005 ms
64 bytes from 2a00:1450:400d:809::200e: seq=7 ttl=57 time=484.605 ms
64 bytes from 2a00:1450:400d:809::200e: seq=8 ttl=57 time=575.984 ms
--- 2a00:1450:400d:809::200e ping statistics ---
9 packets transmitted, 7 packets received, 22% packet loss
round-trip min/avg/max = 484.005/527.762/575.984 ms