Static IP configuration for QMI devices

Bjørn Mork bjorn at mork.no
Sat May 24 03:42:57 PDT 2014


Dan Williams <dcbw at redhat.com> writes:

> I'm not sure SLAAC and privacy extensions will work on QMI devices
> unless there's some built-in support for that in the protocol that I'm
> not aware of.  The address you get from the firmware is pretty much your
> public IPv6 address, at least with the providers I've tried (Verizon and
> T-Mobile).

AFAIK you get a /64 and can use that pretty much as you like.


bjorn at nemi:~$ ip addr show dev wwan0
21: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 5a:39:5f:4a:1f:1c brd ff:ff:ff:ff:ff:ff
    inet6 2a02:2121:1:8c3c:5839:5fff:fe4a:1f1c/64 scope global dynamic 
       valid_lft forever preferred_lft forever
    inet6 fe80::5839:5fff:fe4a:1f1c/64 scope link 
       valid_lft forever preferred_lft forever
bjorn at nemi:~$ traceroute6 vg.no 
traceroute to vg.no (2001:67c:21e0::16) from 2a02:2121:1:8c3c:5839:5fff:fe4a:1f1c, port 33434, from port 55319, 30 hops max, 60 bytes packets
 1  2a02:2121:1:8c3c:0:4:7cfc:f440 (2a02:2121:1:8c3c:0:4:7cfc:f440)  18.796 ms  18.733 ms  23.661 ms 
 2  2a02:2120::2000:0:0:2 (2a02:2120::2000:0:0:2)  26.442 ms  43.757 ms  20.844 ms 
 3  2a02:2120::2000:0:0:1 (2a02:2120::2000:0:0:1)  42.921 ms  32.176 ms  28.712 ms 
^C15% completed...

nemi:/home/bjorn# echo 1 >/proc/sys/net/ipv6/conf/wwan0/use_tempaddr

Don't know if this should be necessary, but I had to take the link down
and up to trigger a temp address allocation. Maybe because that sends a
RS? This was without disconnecting of course:

nemi:/home/bjorn# ip link set wwan0 down
nemi:/home/bjorn# ip link set wwan0 up

bjorn at nemi:~$ ip addr show dev wwan0
21: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 5a:39:5f:4a:1f:1c brd ff:ff:ff:ff:ff:ff
    inet6 2a02:2121:1:8c3c:9d8a:5fee:ffe7:e1f3/64 scope global temporary dynamic 
       valid_lft 604792sec preferred_lft 85792sec
    inet6 2a02:2121:1:8c3c:5839:5fff:fe4a:1f1c/64 scope global dynamic 
       valid_lft forever preferred_lft forever
    inet6 fe80::5839:5fff:fe4a:1f1c/64 scope link 
       valid_lft forever preferred_lft forever


Anyway, I can now use the temp address instead:

bjorn at nemi:~$ traceroute6 -s 2a02:2121:1:8c3c:9d8a:5fee:ffe7:e1f3 vg.no 
traceroute to vg.no (2001:67c:21e0::16) from 2a02:2121:1:8c3c:9d8a:5fee:ffe7:e1f3, port 33434, from port 55298, 30 hops max, 60 bytes packets
 1  2a02:2121:1:8c3c:0:4:7cfc:f440 (2a02:2121:1:8c3c:0:4:7cfc:f440)  21.842 ms  23.072 ms  19.711 ms 
 2  2a02:2120::2000:0:0:2 (2a02:2120::2000:0:0:2)  43.826 ms  21.379 ms  17.867 ms 
 3  2a02:2120::2000:0:0:1 (2a02:2120::2000:0:0:1)  27.979 ms  22.595 ms  30.235 ms 
^C15% completed...


Setting some manual address within this /64 is no problem either:

nemi:/home/bjorn# ip addr add  2a02:2121:1:8c3c::1 dev wwan0

bjorn at nemi:~$ traceroute6 vg.no 
traceroute to vg.no (2001:67c:21e0::16) from 2a02:2121:1:8c3c::1, port 33434, from port 55293, 30 hops max, 60 bytes packets
 1  2a02:2121:1:8c3c:0:4:7cfc:f440 (2a02:2121:1:8c3c:0:4:7cfc:f440)  27.216 ms  40.284 ms  17.421 ms 
 2  2a02:2120::2000:0:0:2 (2a02:2120::2000:0:0:2)  42.215 ms  19.073 ms  18.233 ms 
 3  2a02:2120::2000:0:0:1 (2a02:2120::2000:0:0:1)  26.852 ms  17.592 ms  24.687 ms 
^C15% completed...


>  Besides, the 1/2 the point of privacy extensions was to
> ensure your MAC address wasn't publicly available, and WWAN devices
> don't have MAC addresses.

True, privacy is pointless here.  The qmi_wwan driver use the random MAC
address provided by usbnet, and this will change every time usbnet is
reloaded.  Unless you have one of the few QMI devices with a CDC
ethernet descriptor.  But those tend to use the same address for every
device, so it's not identifying you either.

>  Besides, isn't the IP address actually
> assigned by the SGW anyway, so it wouldn't have anything to do with your
> IMSI/IMEI/etc?

Thinking about this I am glad we didn't use any of these IMEI or MEID
based schemes to create a MAC address :-)


Bjørn


More information about the ModemManager-devel mailing list