How Do I Change the Link MTU?

This article describes how to change the link MTU which is required on networks that use a MTU greater than the default 1500 bytes.

If your network uses a layer 2 MTU greater than the Ethernet default of 1500 then the Preseem and the links it uses need to be configured to accept this larger value. This is often required if the network uses 802.1ad (QinQ) or MPLS.

Preseem Config

Edit the Preseem config file (/etc/preseem/config.yaml) and add:

mtu: 1600

Where 1600 is the desired MTU. After this restart the NetdevManager service.

systemctl restart preseem-netdev-manager

In addition to the Preseem config, the individual links need to be configured as well.

Link Runtime MTU

To change the runtime per-link MTU value the standard linux `ip` command should be used. For example, to change the MTU to 1600 for the link `enp2s0f0` the following command line is used:

/sbin/ip link set enp2s0f0 mtu 1600

Note that this command needs to be run for all link members of a bridge. For Preseem there are always two links per bridge. To see which links are in a particular bridge run:

/sbin/brctl show

Link MTU Persistence

The `ip` command changes the runtime MTU value. To make this take effect after each reboot, the commands above must be placed in the `/etc/rc.d/rc.local` start-up script. Edit this file with your favorite editor (eg vi, vim, edit) and add the following contents:

#!/bin/bash

/sbin/ip link set XXXX mtu YYYY

If the file does not already exists, it needs to be made executable so it runs on boot:

chmod +x /etc/rc.d/rc.local

Then reboot to ensure that the settings are applied properly (this avoids a surprise at some point in the future)