Cannot change MTU (OSError: [Errno 22] Invalid argument)

When trying to change MTU for an interface I get the following error when committing the changes.
Just upgraded to the lates rolling version, but the problem persists.
Help please.

vyos@vyos# set interfaces ethernet eth1 mtu 9000
[edit]
vyos@vyos# commit
[ interfaces ethernet eth1 ]
VyOS had an issue completing a command.

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your

  • business policy requires it)*
    - and include all the information presented below

Report Time: 2020-06-16 19:33:47
Image Version: VyOS 1.3-rolling-202006010117
Release Train: equuleus

Built by: autobuild@vyos.net
Built on: Mon 01 Jun 2020 01:17 UTC
Build UUID: 3b4adee9-8c72-4412-9f67-69814c1cf922
Build Commit ID: be5b71edd77b3a

Architecture: x86_64
Boot via: installed image
System type: Xen PV guest

Hardware vendor: Unknown
Hardware model: Unknown
Hardware S/N: Unknown
Hardware UUID: Unknown

OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  • File “/usr/libexec/vyos/conf_mode/interfaces-ethernet.py”, line 314, in *
  • apply(c)*
  • File “/usr/libexec/vyos/conf_mode/interfaces-ethernet.py”, line 261, in apply*
  • e.set_mtu(eth[‘mtu’])*
  • File “/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py”, line 292, in set_mtu*
  • return self.set_interface(‘mtu’, mtu)*
  • File “/usr/lib/python3/dist-packages/vyos/ifconfig/control.py”, line 152, in set_interface*
  • return self._set_sysfs(self.config, name, value)*
  • File “/usr/lib/python3/dist-packages/vyos/ifconfig/control.py”, line 136, in _set_sysfs*
  • self._sysfs_set[name][‘location’].format(*config), value)
  • File “/usr/lib/python3/dist-packages/vyos/ifconfig/control.py”, line 105, in _write_sysfs*
  • f.write(str(value))*
    OSError: [Errno 22] Invalid argument

[[interfaces ethernet eth1]] failed
Commit failed

Hello @Thunder-Cloud, I think this issue was resolved on the latest rollings, try to update your router.

vyos@R1# run show version | match Version
Version:          VyOS 1.3-rolling-202006170117
[edit]
vyos@R1# set interfaces ethernet eth2 mtu 9000
[edit]
vyos@R1# commit
[edit]
vyos@R1# sudo ip link show dev eth2
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 50:00:00:01:00:02 brd ff:ff:ff:ff:ff:ff

@Dmitry, as you can see above I am on that version already.

@Thunder-Cloud compare please your version and latest

your - VyOS 1.3-rolling-202006 01 0117
latest - VyOS 1.3-rolling-202006 17 0117

Aha! I upgraded it yesterday but theres a new one out today. My bad.
I will try that. Thanks.

@Thunder-Cloud did you successfully update and reboot your router? Because I see in your input version from 01 Jun 2020

I see you’re running under Xen too.

set interfaces ethernet ethX offload sg

This answer brought to you by line 367 of xen-netback/interface.c.

I have raised a bug report for VyOS suggesting it warn users about needing scatter-gather offload if MTU is also being increased beyond 1500.