Dual stack connection on EM7430
Bjørn Mork
bjorn at mork.no
Thu May 11 07:37:05 UTC 2017
Dan Williams <dcbw at redhat.com> writes:
> On Wed, 2017-05-10 at 17:11 -0500, Balaji Sivakumar wrote:
>
>> 1.Is this the IPV6(2001::2:9153:6c2f:89af:a96d) address assigned
>> through
>> mmcli is dhcp-slaac address? Am only able to assign it statically.
>
> This address is provided by the modem firmware, not through IPv6 SLAAC.
..based on a /64 prefix provided by the operator of course. Note that
any and all addresses in this prefix can be used. Not only the one the
modem firmware "assigns". And the firmware will change this address for
every "Get IP config" request, so there is not much point in using it.
I recommend using the "privacy stable"/"stable_secret"/RFC7217 address
scheme. It makes sure the address is stable as long as the prefix is,
without requiring (or revealing) a stable mac address.
But I do wonder about the prefix you've been assigned here. Is that
really the address you get from the modem firmware, or has it been
obfuscated? I don't think it is valid. It's a Teredo address, which of
course cannot be assigned as a /64 prefix in the first place. And it
points to a Teredo-server with the address 0.0.0.2, which of course is
invalid.
Are you actually able to connect anywhere using this address?
> With QMI, IPv6 addressing is always static and provided by the
> modem. Simply set that address on the interface, exactly like you have
> already done, create a default route to the given IPv6 gateway, add the
> given IPv6 DNS servers to /etc/resolv.conf, and you're good to go.
> SLAAC and DHCPv6 are not required.
Not required, and probably best not messing with, but they are supported
by the firmware. The MC74xx supports both. DHCPv6 is only used for DNS.
>> 2. if i understand qmilci has the limitation on dual stack
>> connection, is
>> this right?
>
> qmicli can certainly do a dual-stack connection, but it works the same
> way QMI does internally. You create two WDS clients, one for v4 and
> one for v6, connect each one separately, get each's IP configuration
> separately, but apply that config to the same net interface.
>
> qmicli -d /dev/cdc-wdm0 --client-no-release-cid --wds-start-network="apn=foobar,ip-type=4"
> qmicli -d /dev/cdc-wdm0 --client-cid=<from step #1> --client-no-release-cid --wds-get-current-settings
>
> qmicli -d /dev/cdc-wdm0 --client-no-release-cid --wds-start-network="apn=foobar,ip-type=6"
> qmicli -d /dev/cdc-wdm0 --client-cid=<from step #3> --client-no-release-cid --wds-get-current-settings
>
> (or something like that)
Dan Williams <dcbw at redhat.com>, Aleksander Morgado <aleksander at aleksander.es>, "libqmi (development)" <libqmi-devel at lists.freedesktop.org>
Subject: Re: Dual stack connection on EM7430
From: "Bjørn Mork" <bjorn at mork.no>
Organization: m
Gcc: nnimap+mail.mork.no:INBOX.Sent
--text follows this line--
Dan Williams <dcbw at redhat.com> writes:
> On Wed, 2017-05-10 at 17:11 -0500, Balaji Sivakumar wrote:
>
>> 1.Is this the IPV6(2001::2:9153:6c2f:89af:a96d) address assigned
>> through
>> mmcli is dhcp-slaac address? Am only able to assign it statically.
>
> This address is provided by the modem firmware, not through IPv6 SLAAC.
..based on a /64 prefix provided by the operator of course. Note that
any and all addresses in this prefix can be used. Not only the one the
modem firmware "assigns". And the firmware will change this address for
every "Get IP config" request, so there is not much point in using it.
I recommend using the "privacy stable"/"stable_secret"/RFC7217 address
scheme. It makes sure the address is stable as long as the prefix is,
without requiring (or revealing) a stable mac address.
But I do wonder about the prefix you've been assigned here. Is that
really the address you get from the modem firmware, or has it been
obfuscated? I don't think it is valid. It's a Teredo address, which of
course cannot be assigned as a /64 prefix in the first place. And it
points to a Teredo-server with the address 0.0.0.2, which of course is
invalid.
Are you actually able to connect anywhere using this address?
> With QMI, IPv6 addressing is always static and provided by the
> modem. Simply set that address on the interface, exactly like you have
> already done, create a default route to the given IPv6 gateway, add the
> given IPv6 DNS servers to /etc/resolv.conf, and you're good to go.
> SLAAC and DHCPv6 are not required.
Not required, and probably best not messing with, but they are supported
by the firmware. The MC74xx supports both. DHCPv6 is only used for DNS.
>> 2. if i understand qmilci has the limitation on dual stack
>> connection, is
>> this right?
>
> qmicli can certainly do a dual-stack connection, but it works the same
> way QMI does internally. You create two WDS clients, one for v4 and
> one for v6, connect each one separately, get each's IP configuration
> separately, but apply that config to the same net interface.
>
> qmicli -d /dev/cdc-wdm0 --client-no-release-cid --wds-start-network="apn=foobar,ip-type=4"
> qmicli -d /dev/cdc-wdm0 --client-cid=<from step #1> --client-no-release-cid --wds-get-current-settings
>
> qmicli -d /dev/cdc-wdm0 --client-no-release-cid --wds-start-network="apn=foobar,ip-type=6"
> qmicli -d /dev/cdc-wdm0 --client-cid=<from step #3> --client-no-release-cid --wds-get-current-settings
>
> (or something like that)
I don't know about the MC74xx, but there are many QMI modems where that
won't work. Although they support the IP Family TLV, and can use it to
create single stack IPv6 connections, they do require the recent
qmicli -d /dev/cdc-wdm0 --wds-set-ip-family=[4|6]
before each "start network" request to enable dual stack. Else you end
up with a "policy mismatch" error. So the recommended dual stack
connection procedure is
qmicli -d /dev/cdc-wdm0 --client-no-release-cid --wds-set-ip-family=4
qmicli -d /dev/cdc-wdm0 --client-cid=<from step #1> --client-no-release-cid --wds-start-network="apn=foobar"
qmicli -d /dev/cdc-wdm0 --client-cid=<from step #1> --client-no-release-cid --wds-get-current-settings
qmicli -d /dev/cdc-wdm0 --client-no-release-cid --wds-set-ip-family=6
qmicli -d /dev/cdc-wdm0 --client-cid=<from step #4> --client-no-release-cid --wds-start-network="apn=foobar"
qmicli -d /dev/cdc-wdm0 --client-cid=<from step #4> --client-no-release-cid --wds-get-current-settings
(where I also dropped "ip-type" from start-network - not 100% sure about
that...)
Bjørn
More information about the libqmi-devel
mailing list