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:
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.
https://www.thomas--schaefer.de/surfstick-uebersicht-ipv6.html
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)
Point-to-Point Protocol
[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)
Code: 0
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)
Reserved
MTU: 1500
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)
Reserved
Prefix: 2a00:1110:223:52e7::
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....