NDISDUP+wwan for Huawei devices using the new 'huawei_cdc_ncm' driver

Bjørn Mork bjorn at mork.no
Thu Nov 28 07:00:39 PST 2013


Dan Williams <dcbw at redhat.com> writes:
> On Wed, 2013-11-27 at 14:33 +0100, Bjørn Mork wrote:
>
>> The best I can get is this, which shows the DNS servers (the global
>> addresses) and most likely the interface identifier on the
>> point-to-point link (guessing that is the interface part of the LL
>> address):
>> 
>>  AT*E2IPCFG?
>>  *E2IPCFG: (1,"fe80:0000:0000:0000:0000:000b:5380:d201")(3,"2001:4600:0004:0fff:0000:0000:0000:0054")(3,"2001:4600:0004:1fff:0000:0000:0000:0054")
>
> If you assign that IPv6 LL address to the interface, does it start
> giving you RAs or start allowing DHCPv6? 

Nope. With this command output:

AT*E2IPCFG?
*E2IPCFG: (1,"fe80:0000:0000:0000:0000:0000:e537:1801")(3,"2001:4600:0004:0fff:0000:0000:0000:0054")(3,"2001:4600:0004:1fff:0000:0000:0000:0054")

OK

there is still no response to either of these:


Ethernet II, Src: 02:80:37:ec:02:00 (02:80:37:ec:02:00), Dst: 33:33:00:00:00:02 (33:33:00:00:00:02)
    Destination: 33:33:00:00:00:02 (33:33:00:00:00:02)
        Address: 33:33:00:00:00:02 (33:33:00:00:00:02)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
    Source: 02:80:37:ec:02:00 (02:80:37:ec:02:00)
        Address: 02:80:37:ec:02:00 (02:80:37:ec:02:00)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Type: IPv6 (0x86dd)
Internet Protocol Version 6, Src: fe80::e537:1801 (fe80::e537:1801), Dst: ff02::2 (ff02::2)
    0110 .... = Version: 6
        [0110 .... = This field makes the filter "ip.version == 6" possible: 6]
    .... 0000 0000 .... .... .... .... .... = Traffic class: 0x00000000
        .... 0000 00.. .... .... .... .... .... = Differentiated Services Field: Default (0x00000000)
        .... .... ..0. .... .... .... .... .... = ECN-Capable Transport (ECT): Not set
        .... .... ...0 .... .... .... .... .... = ECN-CE: Not set
    .... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
    Payload length: 16
    Next header: ICMPv6 (58)
    Hop limit: 255
    Source: fe80::e537:1801 (fe80::e537:1801)
    Destination: ff02::2 (ff02::2)
    [Source GeoIP: Unknown]
    [Destination GeoIP: Unknown]
Internet Control Message Protocol v6
    Type: Router Solicitation (133)
    Code: 0
    Checksum: 0x4289 [correct]
    Reserved: 00000000
    ICMPv6 Option (Source link-layer address : 02:80:37:ec:02:00)
        Type: Source link-layer address (1)
        Length: 1 (8 bytes)
        Link-layer address: 02:80:37:ec:02:00 (02:80:37:ec:02:00)


Ethernet II, Src: 02:80:37:ec:02:00 (02:80:37:ec:02:00), Dst: 33:33:00:01:00:02 (33:33:00:01:00:02)
    Destination: 33:33:00:01:00:02 (33:33:00:01:00:02)
        Address: 33:33:00:01:00:02 (33:33:00:01:00:02)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...1 .... .... .... .... = IG bit: Group address (multicast/broadcast)
    Source: 02:80:37:ec:02:00 (02:80:37:ec:02:00)
        Address: 02:80:37:ec:02:00 (02:80:37:ec:02:00)
        .... ..1. .... .... .... .... = LG bit: Locally administered address (this is NOT the factory default)
        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)
    Type: IPv6 (0x86dd)
Internet Protocol Version 6, Src: fe80::e537:1801 (fe80::e537:1801), Dst: ff02::1:2 (ff02::1:2)
    0110 .... = Version: 6
        [0110 .... = This field makes the filter "ip.version == 6" possible: 6]
    .... 0000 0000 .... .... .... .... .... = Traffic class: 0x00000000
        .... 0000 00.. .... .... .... .... .... = Differentiated Services Field: Default (0x00000000)
        .... .... ..0. .... .... .... .... .... = ECN-Capable Transport (ECT): Not set
        .... .... ...0 .... .... .... .... .... = ECN-CE: Not set
    .... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
    Payload length: 60
    Next header: UDP (17)
    Hop limit: 1
    Source: fe80::e537:1801 (fe80::e537:1801)
    Destination: ff02::1:2 (ff02::1:2)
    [Source GeoIP: Unknown]
    [Destination GeoIP: Unknown]
User Datagram Protocol, Src Port: 546 (546), Dst Port: 547 (547)
    Source port: 546 (546)
    Destination port: 547 (547)
    Length: 60
    Checksum: 0xcc3e [validation disabled]
        [Good Checksum: False]
        [Bad Checksum: False]
DHCPv6
    Message type: Solicit (1)
    Transaction ID: 0xbca927
    Client Identifier
        Option: Client Identifier (1)
        Length: 14
        Value: 000100011626d803028037ec0200
        DUID: 000100011626d803028037ec0200
        DUID Type: link-layer address plus time (1)
        Hardware type: Ethernet (1)
        DUID Time: Oct 11, 2011 12:33:39.000000000 CEST
        Link-layer address: 02:80:37:ec:02:00
    Option Request
        Option: Option Request (6)
        Length: 4
        Value: 00170018
        Requested Option code: DNS recursive name server (23)
        Requested Option code: Domain Search List (24)
    Elapsed time
        Option: Elapsed time (8)
        Length: 2
        Value: 0142
        Elapsed-time: 3220 ms
    Identity Association for Non-temporary Address
        Option: Identity Association for Non-temporary Address (3)
        Length: 12
        Value: 37ec020000000e1000001518
        IAID: 37ec0200
        T1: 3600
        T2: 5400


> Ericsson modules were pretty
> good about standards stuff, so maybe they actually enforce that both
> sides know the right IPv6LL address?

I don't see any reason why they should care about LL addresses on the
link between the host and the modem.

> Also note that only 36xx and 55xx modules have *E2IPCFG; the 3507 does
> not.  We didn't bother with E2IPCFG in ModemManager because the modules
> support DHCP.  Unfortunately there's nobody from ericsson around anymore
> to tell us about IPv6...

I have a F3507g and H5321gw (NCM only and not upgradable) too.  Will
test them if/when I can find the time.

> Tore and I tested IPv6 with Ericsson devices a while back.  In my case,
> I successfully got RAs from a 5521gw.  Tore's old contact at Ericsson
> said: "the F5521gw can work as a local PCO to DHCPv6 "bridge" by
> intercepting and changing RA (set o-flag) and then responding to DHCPv6
> Information-Request for DNS"

This sounds like the correct way to implement a modem looking like an
ethernet bridge to the host.

> Further quoting Tore: "Another thing worth noting here is the link-local
> IPv6 address included in PCO. 3GPP specs says you *must* use that
> link-local address. That's not a problem with PPP since that's the one
> you get from IPV6CP, but for fake Ethernet it's a problem, since there
> you typically start out (before the PDP is even up) with an incorrect
> link-local address that's derived from some invented Ethernet MAC
> address."

I don't think this should really be any major problem.  The modem should
use the IPV6CP allocated Interface Indentifier for the LL address on the
mobile interface, and possibly also for it's own global address if it
chooses to add one.  But it can use any LL address on the link to the
host, and the host can also use any LL address it wants.  None of the LL
addresses on the modem - host link should be visible outside that link.
If the modem implements some sort of RA proxy or DHCPv6 relay,
forwarding LL packets from one link to another, then it does of course
have to change the adresses.

> Which makes me think that the E2IPCFG LL address from above should be
> assigned to the interface before trying anything IPv6 related...

I don't think it should matter.  But it was worth a shot.

FWIW, this is the output of the same command in IPv4 mode:

AT*E2IPCFG?
*E2IPCFG: (1,"46.157.32.246")(2,"46.157.32.243")(3,"193.213.112.4")(3,"130.67.15.198")

OK

Comparing this with the response from the DHCP server shows that "1" is
indeed the allocated host address.  I do not understand what "2" is
intended for, but it could be a suggested gateway address?

DHCPDISCOVER on wwan2 to 255.255.255.255 port 67 interval 7
DHCPREQUEST on wwan2 to 255.255.255.255 port 67
DHCPOFFER from 46.157.32.241
DHCPACK from 46.157.32.241
bound to 46.157.32.246 -- renewal in 33095 seconds.




Bjørn


More information about the ModemManager-devel mailing list