Page MenuHomeVyOS Platform

Cannot add / assign L2TPv3 to vrf
Closed, ResolvedPublicBUG


Hey team,

vrf support is great but there is some issue with it. It's not possible to add L2TPv3 interfaces to an vrf.
VRF command is missing for this kind of interface but it is supported by kernel using iproute2 commands:

vyos@vyos# set interfaces l2tpv3 l2tpeth0 vrf 
Configuration path: interfaces l2tpv3 l2tpeth0 [vrf] is not valid

L2TPv3 requires a small trick to create that device if source address of this tunnel is in vrf:

Step 1: Add temporary source address /32 to lo of this L2TPv3 interface
Step 2: Create L2TPv3 interface.
Step 3: Delete source address /32 from lo.

This is required because kernel module has not fully vrf support during creation. So, during creation module looks into default routing table if source address exist. After that module using vrf which is responsible for source address for routing.

vyos@vyos# run show version 

Version:          VyOS 1.4-rolling-202105050912
Release Train:    sagitta

Built by:
Built on:         Wed 05 May 2021 08:12 UTC
Build UUID:       78b8bd29-d828-4d2f-9903-d602aaaddcc0
Build Commit ID:  d3e2f3801f3db1

Please fix!



Difficulty level
Easy (less than an hour)
VyOS 1.4-rolling-202105050912
Why the issue appeared?
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

19: l2tpeth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master foo state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 7e:0a:f4:5c:ef:8c brd ff:ff:ff:ff:ff:ff
    alias L2 VPN Tunnel

master foo <- foo is the VRF name

c-po claimed this task.
c-po triaged this task as Low priority.
c-po changed Difficulty level from Normal (likely a few hours) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Other.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
SrividyaA set Issue type to Bug (incorrect behavior).Aug 31 2021, 3:22 PM