[network-manager] [modem-manager] Network Manager seems to ignore MTU supplied by Modem Manager
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snappy-hwe-snaps |
New
|
Undecided
|
Unassigned |
Bug Description
We are working on bringing up cellular gateways for some of our customers. Cellular networks require the MTU to be honored or the packets are silently dropped without error. At the very least, this is true for Verizon's network.
The behavior I see is that while `modem-manager` provides an appropriate MTU for the connected cellular modem, `network-manager` does not discover this value. As such, `network-manager` does not properly configure a `gsm` network connection and allows packets with a size larger than the allowed MTU to be sent.
Some dbus snippets:
MTU for the cellular device as shown in `modem-manager` via dbus:
dict entry(
string "mtu"
variant uint32 1428
)
MTU for the cellular device as shown in `network-manager` via the dbus:
dict entry(
string "Mtu"
variant uint32 0
)
According to the network manager documentation, it is possible to set the MTU for a `gsm` connection using the `gsm.mtu` property. However, the version of network manager on UC 16 is behind the current generation of network manager and does not provide this property. In fact, there does not appear to be a way we can set the MTU using the network manager DBus API. The only MTU property available to us is in the Device object and it is a read only property.
We have determined a workaround that is not great: We can set the MTU using `ifconfig` but this is not maintained across reboots. To further complicate the issue, our agent snap is generally started before `modem-manager` has made the cellular modem available to the system. So, we cannot simply set the MTU at boot. Instead, we have to wait a while to ensure the cellular device is available and then set the MTU.
Why doesn't network-manager using the MTU show in modem-manager? Is there a way we can set the MTU for a given device that holds across reboots?
Ideally, network-manager would honor the MTU provided by modem-manager and ensure an appropriate MTU is assigned to connections which use the modem.
I would say that in general the cellular connection MTU is negotiated:
1. By pppd for modem that use serial connections
2. By ModemManager for MBIM/QMI modems
In case 1) (which is gemalto modem for rigado), you can actually control the MTU using NM, as NM launches pppd:
$ ip l show ppp0 MULTICAST, NOARP,UP, LOWER_UP> mtu 1430 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 3 MULTICAST, NOARP,UP, LOWER_UP> mtu 1000 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 3
6: ppp0: <POINTOPOINT,
link/ppp
$ nmcli c modify pepe ppp.mtu 1000
$ nmcli c down pepe
$ nmcli c up pepe
$ ip l show ppp0
7: ppp0: <POINTOPOINT,
link/ppp
For the Quectel modem, which uses QMI, it seems correct to me that you cannot set the MTU permanently in an easy way. But, it is quite surprising that you need to do this. QMI should negotiate this properly, and in fact I have never had problems with MTU sizes in cellular connections. Is this really a problem you are finding? Verizon connections worked fine for me when I tested the modem.