DHCP client and MC7304

Dan Williams dcbw at redhat.com
Thu Apr 13 15:53:30 UTC 2017


On Wed, 2017-04-12 at 15:06 -0700, Alexander Kappner wrote:
> Is there any reason why qmi-network does not (at least offer to)
> automatically configure the network interface with the data from --
> wds-get-current-settings (e.g. through ifconfig/ip), without the need
> to get a DHCP client involved?
> 
> I recently came across a similar problem on an EM7455 where the
> interface would not successfully DHCP, and I solved it by
> screenscraping the --wds-get-current-settings output and calling
> ifconfig to manually set ip/netmask/getway. Any good reasons why this
> might be a bad idea? If not,  I'll submit a patch for qmicli and qmi-
> network to provide automatic setup of ip, netmask and routes.

This is probably a good idea, with three caveats:

1) default route: how do you determine whether to overwrite the default
route or not?  qmi-network can be run in a number of different places,
and some may want a default route set and others might not.  So perhaps
you need an option here.

2) DNS: you didn't mention DNS either, and to set up a complete
connection along with the default route, you need to update DNS too. 
This gets tricky, since there are quite a few DNS services these days
(resolvconf/openresolv, systemd-resolved, NetowrkManager, etc) that are
require more than just writing to /etc/resolv.conf.  But I guess
writing to /etc/resolv.conf is at least a start.

3) IIRC devices required DHCP before they'd start working, though these
were from a couple years ago before widespread raw-ip support.  See
ModemManager commit 0c6f1ae6c4bae4b4d82d015f6940e0448749aee3:

---
    qmi: always use DHCP for IPv4 configuration instead of STATIC
    
    Some newer modems (Huawei E1750, Sierra 73xx) provide what looks like
    legitimate static IPv4 configuration through the WDSGetCurrentSettings
    call, but when configured the interface does not pass traffic.  Running
    DHCP on the same interface provides a slightly different IPv4
    configuration but does allow traffic to pass.
    
    Since QMI was switched to static originally for consistency with IPv6
    and for speed of IP configuration (since DHCP takes a bit of time), but
    not for any known problems with modems, let's switch back to DHCP until
    we have time to figure out what's actually going on.
---

I'm not sure we ever figured out what was going on...  But the point
being that we can't always assume that static IP configuration actually
works on all devices.

Dan

> Thanks
> 
> --Alexander
> 
> 	
> 
> On 04/12/2017 12:14 PM, libqmi-devel-request at lists.freedesktop.org
> wrote:
> > > On 11. april 2017 5.35.24 PM Aleksander Morgado <aleksander at aleks
> > > ande
> > > r.es>
> > > wrote:
> > > 
> > > > > > > 
> > > > > > > I use the simplest form - the modem has autoconnect
> > > > > > > enabled
> > > > > > > (using qmicli).
> > > > > > > No ModemManager or qmi-network to handle the connection.
> > > > > > > I'm not
> > > > > > > listening for events, so I don't know yet if any is
> > > > > > > received.
> > > > > 
> > > > > You may then want to run "--wds-get-current-settings"
> > > > > periodically
> > > > > and
> > > > > request a DHCP renew if the reported IP address settings
> > > > > change, or
> > > > > something like that.
> > > > > 
> > > > > --
> > > > > Aleksander
> > > > > https://aleksander.es
> > > > > _______________________________________________
> > > > > libqmi-devel mailing list
> > > > > libqmi-devel at lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/libqmi-devel
> 
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libqmi-devel


More information about the libqmi-devel mailing list