Issues with IPv4v6 and IPv6 on openwrt with a Quectel EG06-E

Aleksander Morgado aleksander at aleksander.es
Fri Nov 8 10:24:18 UTC 2019


On Fri, Nov 8, 2019 at 11:14 AM Bjørn Mork <bjorn at mork.no> wrote:
>
> Aleksander Morgado <aleksander at aleksander.es> writes:
>
> > Ok! we're close then. Looks like the IPv6 part may be overwriting the IPv4 one.
> > Could you retry with the attached patch applied?
>
> Success!
>

Yey!

> root at wrt1900ac-1:~# ifstatus mm
> {
>         "up": true,
>         "pending": false,
>         "available": true,
>         "autostart": true,
>         "dynamic": false,
>         "uptime": 37,
>         "l3_device": "wwan0",
>         "proto": "modemmanager",
>         "updated": [
>                 "addresses",
>                 "routes",
>                 "prefixes"
>         ],
>         "metric": 0,
>         "dns_metric": 0,
>         "delegation": true,
>         "ipv4-address": [
>                 {
>                         "address": "10.222.1.23",
>                         "mask": 28
>                 }
>         ],
>         "ipv6-address": [
>                 {
>                         "address": "2a02:2121:305:867a:4077:d920:480:89da",
>                         "mask": 128
>                 }
>         ],
>         "ipv6-prefix": [
>                 {
>                         "address": "2a02:2121:305:867a:4077:d920:480:89da",
>                         "mask": 64,
>                         "class": "mm",
>                         "assigned": {
>
>                         }
>                 }
>         ],
>         "ipv6-prefix-assignment": [
>
>         ],
>         "route": [
>                 {
>                         "target": "2a02:2121:305:867a:2143:873b:8b8e:c760",
>                         "mask": 128,
>                         "nexthop": "::",
>                         "source": "::/0"
>                 },
>                 {
>                         "target": "::",
>                         "mask": 0,
>                         "nexthop": "2a02:2121:305:867a:2143:873b:8b8e:c760",
>                         "source": "2a02:2121:305:867a:4077:d920:480:89da/64"
>                 },
>                 {
>                         "target": "0.0.0.0",
>                         "mask": 0,
>                         "nexthop": "10.222.1.24",
>                         "source": "10.222.1.23/32"
>                 }
>         ],
>         "dns-server": [
>                 "193.213.112.4",
>                 "130.67.15.198",
>                 "2001:4600:4:fff::52",
>                 "2001:4600:4:1fff::52"
>         ],
>         "dns-search": [
>
>         ],
>         "neighbors": [
>
>         ],
>         "inactive": {
>                 "ipv4-address": [
>
>                 ],
>                 "ipv6-address": [
>
>                 ],
>                 "route": [
>
>                 ],
>                 "dns-server": [
>
>                 ],
>                 "dns-search": [
>
>                 ],
>                 "neighbors": [
>
>                 ]
>         },
>         "data": {
>
>         }
> }
>
>
> root at wrt1900ac-1:~# mmcli -b 0
>   --------------------------------
>   General            |  dbus path: /org/freedesktop/ModemManager1/Bearer/0
>                      |       type: default
>   --------------------------------
>   Status             |  connected: yes
>                      |  suspended: no
>                      |  interface: wwan0
>                      | ip timeout: 20
>   --------------------------------
>   Properties         |        apn: telenor.smart
>                      |    roaming: allowed
>                      |    ip type: ipv4v6
>   --------------------------------
>   IPv4 configuration |     method: static
>                      |    address: 10.222.1.23
>                      |     prefix: 28
>                      |    gateway: 10.222.1.24
>                      |        dns: 193.213.112.4, 130.67.15.198
>                      |        mtu: 1500
>   --------------------------------
>   IPv6 configuration |     method: static
>                      |    address: 2a02:2121:305:867a:4077:d920:480:89da
>                      |     prefix: 64
>                      |    gateway: 2a02:2121:305:867a:2143:873b:8b8e:c760
>                      |        dns: 2001:4600:4:fff::52, 2001:4600:4:1fff::52
>                      |        mtu: 1540
>   --------------------------------
>   Statistics         |   duration: 30
>                      |   bytes rx: 192
>
> root at wrt1900ac-1:~# ifconfig wwan0
> wwan0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
>           inet addr:10.222.1.23  P-t-P:10.222.1.23  Mask:255.255.255.240
>           inet6 addr: fe80::f925:3377:910a:11b7/64 Scope:Link
>           inet6 addr: 2a02:2121:305:867a:4077:d920:480:89da/128 Scope:Global
>           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
>           RX packets:42 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:68 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:4872 (4.7 KiB)  TX bytes:7482 (7.3 KiB)
>

That looks very nice! :D

>
>
>
>
> I tried to provoke the NoEffect error with different illegal
> combinations of APN and context type, but could not find a way to
> reproduce it.  I get either
>
> error: couldn't start network: QMI protocol error (79): 'PolicyMismatch'
>
> or
>
> error: couldn't start network: QMI protocol error (14): 'CallFailed'
> call end reason (1): generic-unspecified
> verbose call end reason (2,210): [internal] pdn-ipv6-call-disallowed
>

Yep, I've seen those in the past myself as well, but not with this
specific setup. I wonder if this is some Quectel-specific issue or
something.

>
> The one thing I haven't yet tested is to modify the stored profile for
> the APN I'm using. In my case I have:
>
> root at wrt1900ac-1:~# qmicli -p -d /dev/cdc-wdm0   --wds-get-profile-list=3gpp
> Profile list retrieved:
>         [1] 3gpp -
>                 APN: 'telenor.smart'
>                 PDP type: 'ipv4-or-ipv6'
>                 PDP context number: '1'
>                 Username: ''
>                 Password: ''
>                 Auth: 'none'
>                 No roaming: 'no'
>                 APN disabled: 'no'
>         [2] 3gpp -
>                 APN: 'internet.public'
>                 PDP type: 'ipv4'
>                 PDP context number: '2'
>                 Username: ''
>                 Password: ''
>                 Auth: 'none'
>                 No roaming: 'no'
>                 APN disabled: 'no'
>
>
>
> I assume context number 1 is used for the default bearer, and that
> changing the PDP type of it will affect the ability to connect to it
> later.  Maybe you'll get the NoEffect error if you create two profiles
> for your dual-stack APN, where the first one is IPV6 and the second is
> IPV4V6, and the default bearer already connected the first one?
>

I've been playing with that myself. These are the profiles I have:

# qmicli -d /dev/cdc-wdm0 -p --wds-get-profile-list=3gpp
Profile list retrieved:
    [1] 3gpp - profile1
        APN: 'data.tre.dk'
        PDP type: 'ipv4'
        PDP context number: '1'
        Username: ''
        Password: ''
        Auth: 'pap'
        No roaming: 'no'
        APN disabled: 'no'
    [2] 3gpp - profile2
        APN: 'internet'
        PDP type: 'ipv6'
        PDP context number: '2'
        Username: ''
        Password: ''
        Auth: 'none'
        No roaming: 'no'
        APN disabled: 'no'
    [3] 3gpp -
        APN: 'internet'
        PDP type: 'ipv4-or-ipv6'
        PDP context number: '3'
        Username: ''
        Password: ''
        Auth: 'none'
        No roaming: 'no'
        APN disabled: 'no'
    [4] 3gpp -
        APN: 'data.tre.dk'
        PDP type: 'ipv4-or-ipv6'
        PDP context number: '4'
        Username: ''
        Password: ''
        Auth: 'none'
        No roaming: 'no'
        APN disabled: 'no'

# qmicli -d /dev/cdc-wdm0 -p --wds-get-default-profile-num=3gpp
Default profile number retrieved:
    Default profile number: '4'

I had profile number 1 before as default, and changed it to 4 (the one
that's ipv4v6) but still no luck, same NoEffect error in the IPv6
setup. Will have to continue investigating, but I believe the
IPv6/IPv4v6 support in the MM protocol handler is good enough now to
be sent to openwrt packages for review :D

-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list