Page MenuHomeVyOS Platform

Add an option to force interface MTU to the value received from DHCP
Needs testing, LowPublicBUG


All MTU configuration nodes contain a default value of 1500. This does not seem to be right, because those values override MTU that can be set from other sources - dynamically by DHCP client, for example, or even manually via custom scripts.
I think that it would be better to remove default values from there and allow using by default what a driver and Linux kernel suggest during interface initialization.

One of the obvious examples of the problem:

  1. Configure DHCP client on an interface.
  2. Get MTU via DHCP - it will be changed accordingly.
  3. Change any interface setting.
  4. MTU is back again to the default 1500 value.


Difficulty level
Easy (less than an hour)
1.4-rolling-202207270217, 1.3.1-S1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

zsdc changed the task status from Open to Confirmed.Wed, Jul 27, 11:28 AM
zsdc triaged this task as Low priority.
zsdc created this task.
zsdc added a project: VyOS 1.3 Equuleus.

Will it affect also tunnels/openvpn/wireguard/vxlan etc?
If you get rid of the default MTU values you get more pain.

I have no proof now of any obvious negative issues. Moreover, in my personal opinion - if some protocol or interface type requires a default MTU that is not assigned to it by the kernel, this is the problem that should be solved by configuration script for that particular interface.

Forcibly stretching the same MTU to all interfaces, regardless of other system components' logic, does not seems to be a good idea as well as missing default MTU for interfaces that may require it. Here I think that easier to assign MTU where this is really necessary than ignore it where it interferes with something.

Will it work if you replace this

sudo nano -c +1385 /usr/lib/python3/dist-packages/vyos/ifconfig/


# MTU - Maximum Transfer Unit
#if 'mtu' in config:
#    self.set_mtu(config.get('mtu'))
if 'mtu' in config and 'dhcp' not in new_addr:

To solve the issue with MTU over DHCP we can use some new options like mtu for example:

set interfaces ethernet eth0 dhcp-options mtu
Viacheslav changed the task status from Confirmed to Needs testing.Thu, Aug 4, 3:11 PM
dmbaturin renamed this task from Remove default values in MTU nodes to Add an option to force interface MTU to the value received by DHCP.Sun, Aug 14, 5:42 PM
dmbaturin renamed this task from Add an option to force interface MTU to the value received by DHCP to Add an option to force interface MTU to the value received from DHCP.