Re: dhcpcd: raw-ip support

2019-08-21 Thread Dan Williams
On Mon, 2019-08-19 at 16:20 +0200, Yegor Yefremov wrote:
> On Mon, Aug 19, 2019 at 2:57 PM Bjørn Mork  wrote:
> > Yegor Yefremov  writes:
> > > On Mon, Aug 19, 2019 at 10:49 AM Bjørn Mork 
> > > wrote:
> > > > Yegor Yefremov  writes:
> > > > 
> > > > > I have a project where I'm using dhcpcd client. It is working
> > > > > without
> > > > > any problems with older modems like Quectel UC20 etc. But now
> > > > > we want
> > > > > to switch to SIM7600G-H and it is working in raw-ip mode. So
> > > > > far only
> > > > > udhcpc can handle such MAC address-less interfaces.
> > > > > 
> > > > > Do you know what is so special about udhcpc compared to other
> > > > > DHCP
> > > > > clients?
> > > > 
> > > > It's mostly L2 agnostic, meaning that it will work on non-
> > > > ethernet
> > > > interfaces.
> > > > 
> > > > "Fixing" this for other clients isn't really that hard, if
> > > > required. I
> > > > did this proof-of-concept for ISC dhclient for example:
> > > > 
> > > >  
> > > > https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00044.html
> > > 
> > > Thanks for the patch. But looks like it hasn't been upstreamed
> > > yet :-(
> > 
> > Upstreaming anything to ISC is not possible in my experience.  See
> > https://lists.isc.org/pipermail/dhcp-users/2011-August/013926.html
> > 
> > Or at least not worth the extra effort required.
> > 
> > And I don't think raw-ip support is all that useful, to be
> > honest.  The
> > DHCP server in the modem is a hack anyway.  You should use the
> > modem
> > management channel to get IP config from the modem.  I.e. QMI.
> 
> How one supposed to set the IP configuration via QMI? I can connect
> using:
> 
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-start-network="ip-type=4,apn=www.bla.com"
> --client-no-release-cid
> 
> and get IP config via:
> 
> # qmicli -d /dev/cdc-wdm0 --device-open-proxy
> --wds-get-current-settings --client-cid=17
> [/dev/cdc-wdm0] Current settings retrieved:
>IP Family: IPv4
> IPv4 address: 10.33.151.131
> IPv4 subnet mask: 255.255.255.248
> IPv4 gateway address: 10.33.151.132
> IPv4 primary DNS: 62.109.121.17
>   IPv4 secondary DNS: 62.109.121.18
>  MTU: 1430
>  Domains: none
> 
> How can these settings be automatically applied to wwan0? Am I
> missing
> related MM options here?

The thing that tells ModemManager to start the connection is usually
what is responsible for applying the IP configuration. That would
either be something like NetworkManager or custom scripting.

Dan

> Yegor
> 
> 
> > But DHCPv6 support on PPP links is something else.  It's an
> > essential
> > feature for a DHCPv6 client.  As you may or may not know, IPV6CP is
> > very
> > different from IPCP when it comes to address negotiation. It will
> > only
> > negotiate an interface-id and leave the remaining address config to
> > the
> > normal autoconf protocols.  I.e. you need to run SLAAC and/or
> > DHCPv6 on
> > the link if you want a global address.
> > 
> > Somewhat off-topic here. Unless you have a modem with support for
> > IPv6
> > over PPP, which I recently learned actuall exists:
> > https://forum.openwrt.org/t/ipv6-with-ppp-with-3g-modem/39071
> > 
> > I'll stop babbling now
> > 
> > 
> > Bjørn
> ___
> ModemManager-devel mailing list
> ModemManager-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: dhcpcd: raw-ip support

2019-08-21 Thread Yegor Yefremov
On Mon, Aug 19, 2019 at 4:20 PM Yegor Yefremov
 wrote:
>
> On Mon, Aug 19, 2019 at 2:57 PM Bjørn Mork  wrote:
> >
> > Yegor Yefremov  writes:
> > > On Mon, Aug 19, 2019 at 10:49 AM Bjørn Mork  wrote:
> > >> Yegor Yefremov  writes:
> > >>
> > >> > I have a project where I'm using dhcpcd client. It is working without
> > >> > any problems with older modems like Quectel UC20 etc. But now we want
> > >> > to switch to SIM7600G-H and it is working in raw-ip mode. So far only
> > >> > udhcpc can handle such MAC address-less interfaces.
> > >> >
> > >> > Do you know what is so special about udhcpc compared to other DHCP
> > >> > clients?
> > >>
> > >> It's mostly L2 agnostic, meaning that it will work on non-ethernet
> > >> interfaces.
> > >>
> > >> "Fixing" this for other clients isn't really that hard, if required. I
> > >> did this proof-of-concept for ISC dhclient for example:
> > >>
> > >>  
> > >> https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00044.html
> > >
> > > Thanks for the patch. But looks like it hasn't been upstreamed yet :-(
> >
> > Upstreaming anything to ISC is not possible in my experience.  See
> > https://lists.isc.org/pipermail/dhcp-users/2011-August/013926.html
> >
> > Or at least not worth the extra effort required.
> >
> > And I don't think raw-ip support is all that useful, to be honest.  The
> > DHCP server in the modem is a hack anyway.  You should use the modem
> > management channel to get IP config from the modem.  I.e. QMI.
>
> How one supposed to set the IP configuration via QMI? I can connect using:
>
> qmicli --device=/dev/cdc-wdm0 --device-open-proxy
> --wds-start-network="ip-type=4,apn=www.bla.com"
> --client-no-release-cid
>
> and get IP config via:
>
> # qmicli -d /dev/cdc-wdm0 --device-open-proxy
> --wds-get-current-settings --client-cid=17
> [/dev/cdc-wdm0] Current settings retrieved:
>IP Family: IPv4
> IPv4 address: 10.33.151.131
> IPv4 subnet mask: 255.255.255.248
> IPv4 gateway address: 10.33.151.132
> IPv4 primary DNS: 62.109.121.17
>   IPv4 secondary DNS: 62.109.121.18
>  MTU: 1430
>  Domains: none
>
> How can these settings be automatically applied to wwan0? Am I missing
> related MM options here?
>
> Yegor
>
>
> > But DHCPv6 support on PPP links is something else.  It's an essential
> > feature for a DHCPv6 client.  As you may or may not know, IPV6CP is very
> > different from IPCP when it comes to address negotiation. It will only
> > negotiate an interface-id and leave the remaining address config to the
> > normal autoconf protocols.  I.e. you need to run SLAAC and/or DHCPv6 on
> > the link if you want a global address.
> >
> > Somewhat off-topic here. Unless you have a modem with support for IPv6
> > over PPP, which I recently learned actuall exists:
> > https://forum.openwrt.org/t/ipv6-with-ppp-with-3g-modem/39071
> >
> > I'll stop babbling now

dhcpcd also provides raw-ip support now (see the master branch).

Cheers,
Yegor
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: dhcpcd: raw-ip support

2019-08-19 Thread Dan Williams
On Mon, 2019-08-19 at 14:57 +0200, Bjørn Mork wrote:
> Yegor Yefremov  writes:
> > On Mon, Aug 19, 2019 at 10:49 AM Bjørn Mork  wrote:
> > > Yegor Yefremov  writes:
> > > 
> > > > I have a project where I'm using dhcpcd client. It is working
> > > > without
> > > > any problems with older modems like Quectel UC20 etc. But now
> > > > we want
> > > > to switch to SIM7600G-H and it is working in raw-ip mode. So
> > > > far only
> > > > udhcpc can handle such MAC address-less interfaces.
> > > > 
> > > > Do you know what is so special about udhcpc compared to other
> > > > DHCP
> > > > clients?
> > > 
> > > It's mostly L2 agnostic, meaning that it will work on non-
> > > ethernet
> > > interfaces.
> > > 
> > > "Fixing" this for other clients isn't really that hard, if
> > > required. I
> > > did this proof-of-concept for ISC dhclient for example:
> > > 
> > >  
> > > https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00044.html
> > 
> > Thanks for the patch. But looks like it hasn't been upstreamed yet
> > :-(
> 
> Upstreaming anything to ISC is not possible in my experience.  See
> https://lists.isc.org/pipermail/dhcp-users/2011-August/013926.html
> 
> Or at least not worth the extra effort required.
> 
> And I don't think raw-ip support is all that useful, to be
> honest.  The
> DHCP server in the modem is a hack anyway.  You should use the modem
> management channel to get IP config from the modem.  I.e. QMI.
> 
> But DHCPv6 support on PPP links is something else.  It's an essential
> feature for a DHCPv6 client.  As you may or may not know, IPV6CP is
> very
> different from IPCP when it comes to address negotiation. It will
> only
> negotiate an interface-id and leave the remaining address config to
> the
> normal autoconf protocols.  I.e. you need to run SLAAC and/or DHCPv6
> on
> the link if you want a global address.
> 
> Somewhat off-topic here. Unless you have a modem with support for
> IPv6
> over PPP, which I recently learned actuall exists:
> https://forum.openwrt.org/t/ipv6-with-ppp-with-3g-modem/39071

Nokia 21M-02 (Icera HSPA chipset) is what I used to develop + verify
the PPPv6 support in ModemManager and NetworkManager a number of years
ago. They do exist but in my experience are pretty rare as IPv6 only
because common with LTE networks and almost nobody should be using PPP
with LTE.

And yes there the procedure is to acquire the Interface ID (IID) from
IPV6CP, use that to generate the IPv6 Link-Local address and assign it
to the PPP interface, then run SLAAC to get your prefix and (if SLAAC
tells you to) DHCPv6 for DNS servers. The 21M-02 (or T-Mobile US)
didn't implement DNSSD or RDNSS options for RAs so for me static DNS or
DHCPv6 was necessary.

Dan

___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: dhcpcd: raw-ip support

2019-08-19 Thread Yegor Yefremov
On Mon, Aug 19, 2019 at 10:49 AM Bjørn Mork  wrote:
>
> Yegor Yefremov  writes:
>
> > I have a project where I'm using dhcpcd client. It is working without
> > any problems with older modems like Quectel UC20 etc. But now we want
> > to switch to SIM7600G-H and it is working in raw-ip mode. So far only
> > udhcpc can handle such MAC address-less interfaces.
> >
> > Do you know what is so special about udhcpc compared to other DHCP
> > clients?
>
> It's mostly L2 agnostic, meaning that it will work on non-ethernet
> interfaces.
>
> "Fixing" this for other clients isn't really that hard, if required. I
> did this proof-of-concept for ISC dhclient for example:
>
>  
> https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00044.html

Thanks for the patch. But looks like it hasn't been upstreamed yet :-(

Will dig further.

Yegor

> > Is there any raw-ip related documentation?
>
> Not really. Just delete "ethernet" from other documentation :-)
>
> The only difference is that the ethernet header is removed from the
> packets between host and modem.  It is not replaced by anything.
>
> We could have made up a new "ARP hardware type" for this, but I didn't
> see much point.  The "hardware type" is simply no header and no
> address. So I went with the example from the tuntap driver, using
> ARPHRD_NONE
>
>
>
> Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel

Re: dhcpcd: raw-ip support

2019-08-19 Thread Bjørn Mork
Yegor Yefremov  writes:

> I have a project where I'm using dhcpcd client. It is working without
> any problems with older modems like Quectel UC20 etc. But now we want
> to switch to SIM7600G-H and it is working in raw-ip mode. So far only
> udhcpc can handle such MAC address-less interfaces.
>
> Do you know what is so special about udhcpc compared to other DHCP
> clients?

It's mostly L2 agnostic, meaning that it will work on non-ethernet
interfaces.

"Fixing" this for other clients isn't really that hard, if required. I
did this proof-of-concept for ISC dhclient for example:

 https://mail.gnome.org/archives/networkmanager-list/2015-December/msg00044.html

> Is there any raw-ip related documentation?

Not really. Just delete "ethernet" from other documentation :-)

The only difference is that the ethernet header is removed from the
packets between host and modem.  It is not replaced by anything.

We could have made up a new "ARP hardware type" for this, but I didn't
see much point.  The "hardware type" is simply no header and no
address. So I went with the example from the tuntap driver, using
ARPHRD_NONE



Bjørn
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel