[OpenWrt-Devel] netifd: per-interface MTU settings vs per-route MTU settings?

Aleksander Morgado aleksander at aleksander.es
Mon May 25 03:13:45 EDT 2020


>> There's an ongoing discussion in the ModemManager package in github
>> related to how the MTU may be configured in the network interface
>> based on what the MM bearer object reports:
>> https://github.com/openwrt/packages/issues/11383
>> E.g.:
>> $ ip route show
>> default via dev wwan0 proto static src mtu 1430
>> Looks like the protocol handler implementation for netifd may allow
>> setting the MTU to the routes associated with the network interface,
>> instead of assigning the MTU value to the interface itself. Are both
>> methods completely equivalent? Is there any reason to avoid setting
>> the MTU in the interface when using netifd, or just not implemented
>> yet?
>> Cheers!
>> --
>> Aleksander
>> https://aleksander.es
> I'm actually not aware of any method to set the interface MTU via netifd that isn't a UCI setting.

While running as a protocol handler under netifd, we can do this while
setting up the default route:
  proto_add_ipv4_route "" "0" "${gateway}" "${address}"
"${metric}" "${mtu}"
And the given ${mtu} will be set for the route created.

What we're looking for is a way to setup the MTU for the whole network
interface from within the protocol handler automatically.


openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list