Configuring MTU Settings for Bonded Interfaces in NetworkManager
Introduction
When configuring MTU values on bonded interfaces in Rocky Linux using NetworkManager’s nmcli
, you may find that the MTU changes aren't reflected when you inspect the interfaces (for example, via ip a | grep mtu
). Although NetworkManager’s logs indicate that NetworkManager applies the MTU, the setting resets to the default value. This can happen when you incorrectly apply the MTU settings to the interface instead of the bond.
Problem
The issue occurs because the MTU is only set on the slave interfaces and not on the bond interface itself. NetworkManager propagates MTU settings from the bond interface down to its slaves and any VLANs on top of it, but it doesn't propagate in the opposite direction. Without an MTU on the primary bond connection, slave interfaces inherit the default MTU.
Symptoms
You may observe all or some of the following:
-
MTU values applied via
nmcli
don't appear in the output ofip a | grep mtu
. -
NetworkManager journal logs report the MTU change but the interfaces retain the default MTU.
-
Slave interface such as eth1 and eth2, show the default MTU instead of the desired value.
-
VLAN interfaces on top of the bond don't inherit the configured MTU.
Resolution
Correct configuration approach
The key to resolving this issue is to ensure the MTU is properly set in the bond interface configuration file, as MTU settings propagate from the bond interface to its slaves, but not in reverse.
Edit the bond interface configuration
sudo vi /etc/NetworkManager/system-connections/bond0.nmconnection
Add the MTU setting under the [ethernet]
section
[ethernet]
mtu=9000
Remove any MTU settings from the slave interface configuration files
sudo vi /etc/NetworkManager/system-connections/eth1.nmconnection
sudo vi /etc/NetworkManager/system-connections/eth2.nmconnection
# Remove any `mtu=` lines from these files
Applying the changes
There are several methods to apply these changes:
Reload the configuration without disruption
sudo nmcli con load /etc/NetworkManager/system-connections/bond0.nmconnection
sudo nmcli dev reapply bond0
This method attempts to update the device with changes to the active connection without disconnecting.
Restart the connection
sudo nmcli con down bond0
sudo nmcli con up bond0
This method is more disruptive but may be necessary if Method 1 doesn't work.
Restart NetworkManager
sudo systemctl restart NetworkManager
It's generally advisable to use more targeted approaches, such as reapplying the connection or bringing the interface down and back up, before opting for a full service restart.
Verification
After applying the changes, verify the MTU settings are correctly applied:
ip a | grep mtu
The output should show the bond interface and all related interfaces (slaves and VLANs) with the specified MTU value.
Notes
-
MTU settings propagate from bond interfaces to their slaves, not the other way around.
-
Restarting NetworkManager isn't intended to perform the same "down" and "up" actions as restarting network initscripts.
-
For persistent changes, always make sure the configurations are properly set in the connection files.
-
The
nmcli dev reapply
command attempts to update a device with changes made to the active connection since it was last applied.
References
Rocky Linux NetworkManager Gem
Rocky Linux NetworkManager Documentation