Page MenuHomeVyOS Platform

Cannot enable the interface when the MTU is set to less than 1280
Closed, ResolvedPublicBUG

Description

vyos@vyos# show interfaces
 bonding bond0 {
     member {
         interface eth0
         interface eth1
     }
 }
 ethernet eth0 {
     hw-id 0c:e6:b1:4e:f5:00
 }
 ethernet eth1 {
     description XX
     hw-id 0c:e6:b1:4e:f5:01
 }
 ethernet eth2 {
     disable
     hw-id 0c:e6:b1:4e:f5:02
     mtu 900
 }
 ethernet eth3 {
     disable
     hw-id 0c:e6:b1:4e:f5:03
     mac 0c:e6:b1:bb:22:11
 }
[edit]
vyos@vyos# delete interfaces ethernet eth2 disable
[edit]
vyos@vyos# commit
[ interfaces ethernet eth2 ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
  https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
  https://forum.vyos.io
- Join our community on slack where our users exchange help and advice
  https://vyos.slack.com

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-04 12:05:44
Image Version:    VyOS 1.3-rolling-202005231822
Release Train:    equuleus

Built by:         [email protected]
Built on:         Sat 23 May 2020 18:22 UTC
Build UUID:       accc3924-d101-45e8-aa0d-3c4c4273a147
Build Commit ID:  a29347ca9dd260

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:    
Hardware UUID:    de852a79-4620-4241-a116-4d37e8f54ef5

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 308, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 252, in apply
    e.add_ipv6_eui64_address(addr)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 449, in add_ipv6_eui64_address
    self.add_addr(f'{eui64}/{prefixlen}')
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 679, in add_addr
    self._cmd(f'ip addr add "{addr}" dev "{self.ifname}"')
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 48, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 178, in cmd
    raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip addr add "fe80::ee6:b1ff:fe4e:f502/64" dev "eth2"
returned:
exit code: 2

noteworthy:
cmd 'ip addr add "fe80::ee6:b1ff:fe4e:f502/64" dev "eth2"'
returned (out):

returned (err):
RTNETLINK answers: No buffer space available

[[interfaces ethernet eth2]] failed
Commit failed
[edit]
vyos@vyos#

Details

Difficulty level
Unknown (require assessment)
Version
1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Related Objects

Event Timeline

Unknown Object (User) claimed this task.Jun 11 2020, 7:01 PM
Unknown Object (User) created this task.
Unknown Object (User) renamed this task from Cannot enable the interface when the MTU is set to Cannot enable the interface when the MTU is set to less than 1280.Jun 11 2020, 7:19 PM

As a side-note, the kernel reacts correctly to this by rfc6145.

An IPv6 link has to have an MTU of 1280 bytes or greater. The corresponding limit for IPv4 is 68 bytes.

It would be possible to make the scripts check if IPv6 is enabled on the interface (or system?) and make the minimal MTU 1280 in that case. If IPv6 on the interface is disabled or not supported, have it go as low as it can.

Viacheslav added a subscriber: Viacheslav.

Fixed

vyos@r4-roll# run show version 

Version:          VyOS 1.3-rolling-202010210152

You can't set mtu 900 on disabled/enabled interface

vyos@r4-roll# set interfaces ethernet eth1 mtu 900
[edit]
vyos@r4-roll# commit
[ interfaces ethernet eth1 ]
link-local IPv6 address will be configured on interface "eth1" thus the minimum MTU requirement is 1280!

[[interfaces ethernet eth1]] failed
Commit failed
[edit]
vyos@r4-roll#

You actually can when setting ipv6 disable-link-local addressing on the particular interface.

How to do it?

sudo sysctl -w net.ipv6.conf.eth1.autoconf=0
sudo sysctl -w net.ipv6.conf.eth1.accept_ra=0

vyos@r4-roll# set interfaces ethernet eth1 ipv6 address no-default-link-local 
[edit]
vyos@r4-roll# commit

vyos@r4-roll# set interfaces ethernet eth1 mtu 900
vyos@r4-roll# commit
link-local IPv6 address will be configured on interface "eth1" thus the minimum MTU requirement is 1280!
[[interfaces ethernet eth1]] failed
Commit failed
[edit]
vyos@r4-roll# 

link-local IPv6 address will be configured on interface "eth1" thus the minimum MTU requirement is 1280!
[[interfaces ethernet eth1]] failed
Commit failed
[edit]
vyos@r4-roll#

set interfaces ethernet eth1 ipv6 address no-default-link-local is the right command, yes

erkin removed Unknown Object (User) as the assignee of this task.Aug 30 2021, 5:33 AM
erkin set Issue type to Bug (incorrect behavior).
erkin edited subscribers, added: Unknown Object (User); removed: Active contributors.