Page MenuHomeVyOS Platform

MPLS sysctl not persistent for tunnel interfaces
Closed, ResolvedPublicBUG

Description

Hello,
I have a setup where two VyOS devices have a MPLS link over GRE.

The tunnel is tun0, and the configuration is (relevant part):

set interfaces tunnel tun0 address '10.255.0.2/30'
set interfaces tunnel tun0 encapsulation 'gre'
set interfaces tunnel tun0 remote '10.255.255.1'
set interfaces tunnel tun0 source-address '10.255.255.2'

set protocols mpls interface 'dum1'
set protocols mpls interface 'tun0'
set protocols mpls ldp discovery transport-ipv4-address '10.255.1.2'
set protocols mpls ldp interface 'dum1'
set protocols mpls ldp interface 'tun0'
set protocols mpls ldp router-id '10.255.1.2'

After the configuration, everything looks good and working fine... Until I do a reboot.

In fact, it seems that after the reboot this sysctl flag is not set:

net.mpls.conf.tun0.input = 0

If I perform the following actions:

delete protocols mpls interface tun0
commit
set protocols mpls interface tun0
commit

then the sysctl is restored:

net.mpls.conf.tun0.input = 1

and everything works again.

Details

Version
1.4-rolling-202206270217
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Feature (new functionality)

Event Timeline

hi

it's a common behavior when you want to set sysctl variable and bash-cli is used ( vyos-cli by default when restart the vm set this value in 0 ) . however , it's possible to configure it with this command :

vyos@vyos1-v1# set system sysctl parameter net.mpls.conf.tun0.input value 1

vyos@vyos1-v1# sudo sysctl -a | grep net.mpls.conf.tun0
net.mpls.conf.tun0.input = 1

i'll change it how a feature request , i think that we can enable it when you set mpls ldp and uses a tunnel interface.

fernando changed the task status from Open to Confirmed.Jun 27 2022, 2:05 PM
fernando triaged this task as Low priority.
fernando changed Issue type from Bug (incorrect behavior) to Feature (new functionality).

Hi,
I think this is a BUG, not a feature.
If I enable mpls on an interface, then the proper sysctl flags must be applied and be persistent.

This is not a flag I want to add on my own. It's a required flag for make MPLS to work.

(it works well when I do the config, but it's not persistent on reboot. I guess the reason is that the mpls commands are launched before the tunnel interface is created, so at that time it's not possible to set the sysctl flag)

ref: https://github.com/vyos/vyos-1x/blob/d32ee4ad297c8754d0841b84b958a12a926cfef9/src/conf_mode/protocols_mpls.py#L123

It seems a wrong priority
Mpls configuration applied before creation tunnel
As a result sysctl parameter for the tunnel interface doesn't exist yet
To reproduce it in one commit:

set interfaces dummy dum1 address '10.5.4.8/24'
set interfaces tunnel tun0 address '10.255.0.2/30'
set interfaces tunnel tun0 encapsulation 'gre'
set interfaces tunnel tun0 remote '192.0.2.254'
set interfaces tunnel tun0 source-address '192.0.2.1'
set protocols mpls interface 'dum1'
set protocols mpls interface 'tun0'
set protocols mpls ldp discovery transport-ipv4-address '192.0.2.1'
set protocols mpls ldp interface 'dum1'
set protocols mpls ldp interface 'tun0'
set protocols mpls ldp router-id '192.0.2.1'


vyos@r14# sysctl net.mpls.conf.tun0.input
net.mpls.conf.tun0.input = 0

Also similar task for tunnel + sysctl T3813

Viacheslav changed the task status from Confirmed to In progress.Jun 28 2022, 8:03 AM
Viacheslav claimed this task.

Will be fixed in the next rolling release

Viacheslav moved this task from Open to Finished on the VyOS 1.4 Sagitta board.
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus (1.3.2) board.