Re: ModemManager and muxed network interfaces



On Mon, 2021-02-15 at 21:25 +0100, Aleksander Morgado wrote:
Hey all,

I'm working on setting up muxed network interfaces with ModemManager
so that e.g. you can connect to multiple APNs at the same time, each
with its own subnet on a different virtual network interface link
created from the "master" wwan modem interface. These links can be
done either with mbim (using VLANs) or qmi (using the built-in muxing
capabilities of qmi_wwan or with rmnet).

Now, in order to integrate this with NetworkManager, the main
difference that NM will see upon connecting a modem through MM will
be that the data port reported in the Bearer info that
Simple.Connect() returns is no longer the master wwan interface, but
a new "qmimux0" interface (name varies depending on the kernel backed
used).

I already have this logic setup in a custom branch, but I'm lacking 2
things right now:
  * When setting up the muxing support, we need to configure the MTU
of the master wwan interface to a specific value that the modem tells
us to use (the maximum data aggregation size).
  * And also, before NetworkManager can bring up the "qmimux0" link
interface, the "master" wwan modem interface needs to be already up
or the link ifup will fail.

I can definitely add those two things to the ModemManager connection
logic, but wanted to ask, is there any way NetworkManager could setup
both the master network interface AND then the muxed qmimux0
interface? E.g. if MM exposed all those things in DBus, could NM
setup both those interfaces? Or is that too much change in the NM
logic because it truly expects to setup one interface at a time?

I think the way to go is to add it in MM, so that theoretically NM
does not need to do absolutely anything, but wanted to ask first
anyway.
Any comments or suggestions?

Hi Aleksander,


NetworkManager's primary means of configuring something is by having a
connection profile to begin with.

If the master network interface requires non-trivial configuration,
then it probably would also require a profile in NetworkManager, and
the "port" interface would refer to that controller interface.

On the other hand, for vlan interfaces/profiles you don't necessarily
need a profile for the parent device. Specifying the parent (interface
name) is enough.

Also, that one connection profile in NetworkManager can control
multiple "devices", is not new. That also happens when you activate a
modem connection. There is the control port (a NMDevice) but there is
also the actual interface with the IP configuration. I think that is
currently not solved well and is in dire need of improvement, but in
general, that there are multiple "devices" that are configured by one
profile is also viable.


On the other hand, if MM can abstract all of this nicely, then indeed
it seems good if MM does it. That would also (theoretically) simplify
it for users who don't wnat to use NM but MM.

It depends. What kind of configuration would be relevant for a
connection profile for NetworkManager?


best,
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]