Page MenuHomeVyOS Platform

VPP:MPLS/LDP over a VPP interface, not enabling the MPLS feature in VPP
In progress, NormalPublicBUG

Description

MPLS, on a VPP interface, builds a fully healthy control
plane and comes operational, labels are bound and exchanged, the kernel gets the correct
route but MPLS is actually not enabled on the VPP interface itself. Every labeled
frame is dropped.

Steps to reproduce

r1 (router-id 10.255.0.1)

set vpp settings interface eth1
set interfaces vpp loopback vpplo0 address '10.255.0.1/32'
set protocols mpls interface eth1
set protocols mpls ldp router-id '10.255.0.1'
set protocols mpls ldp interface eth1
set protocols mpls ldp discovery transport-ipv4-address '10.255.0.1'
set protocols mpls ldp export ipv4 explicit-null
set protocols static route '10.255.0.2/32' next-hop '10.130.2.2'
commit

r2 (router-id 10.255.0.2)

set interfaces ethernet eth1 address '10.130.2.2/24'
set vpp settings interface eth1
set interfaces vpp loopback vpplo0 address '10.255.0.2/32'
set protocols mpls interface eth1
set protocols mpls ldp router-id '10.255.0.2'
set protocols mpls ldp interface eth1
set protocols mpls ldp discovery transport-ipv4-address '10.255.0.2'
set protocols mpls ldp export ipv4 explicit-null
set protocols static route '10.255.0.1/32' next-hop '10.130.2.1'
commit
vyos@vpp1-r1:~$ show mpls ldp neighbor
AF   ID              State       Remote Address  Uptime  
ipv4 10.255.0.2      OPERATIONAL 10.255.0.2      00:00:40
vyos@vpp1-r1:~$ show mpls ldp binding 
AF   Destination          Nexthop         Local Label Remote Label  In Use
ipv4 10.255.0.1/32        10.255.0.2      exp-null    16                no
ipv4 10.255.0.2/32        10.255.0.2      16          exp-null         yes

vyos@vpp1-r1:~$ show ip route 
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

IPv4 unicast VRF default:
C>* 10.130.2.0/24 is directly connected, eth1, weight 1, 14:26:05
L>* 10.130.2.1/32 is directly connected, eth1, weight 1, 14:26:05
L * 10.255.0.1/32 is directly connected, vpplo0, weight 1, 14:26:05
C>* 10.255.0.1/32 is directly connected, vpplo0, weight 1, 14:26:05
S>* 10.255.0.2/32 [1/0] via 10.130.2.2, eth1, label IPv4 Explicit Null, weight 1, 14:26:04
C>* 192.168.130.0/24 is directly connected, eth0, weight 1, 5d02h29m
L>* 192.168.130.10/32 is directly connected, eth0, weight 1, 5d02h29m

vppctl

vyos@vpp1-r1:~$ vppctl show interface feat eth1 | grep -a1 mpls-input

mpls-input:
  mpls-not-enabled

trace

Packet 20

14:37:56:058988: virtio-input
  virtio: hw_if_index 2 next-index 4 vring 0 len 102
    hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0 csum_offset 0 num_buffers 1
14:37:56:058991: ethernet-input
  frame: flags 0x1, hw-if-index 2, sw-if-index 2
  MPLS: 52:54:00:01:01:00 -> 52:54:00:02:01:00
14:37:56:058995: mpls-input
  MPLS: next BUG![2]  label 0 ttl 64 exp 0
14:37:56:058996: mpls-not-enabled
  drop
14:37:56:058997: error-drop
  rx:tap4096
14:37:56:058998: drop
  mpls-input: MPLS not enabled

Workaround: manually add mpls-input on both sides

sudo vppctl set interface mpls eth1 enable
sudo vppctl set interface mpls tap4096 enable
vyos@vpp1-r1:~$ ping 10.255.0.2 source-address 10.255.0.1 count 5
PING 10.255.0.2 (10.255.0.2) from 10.255.0.1 : 56(84) bytes of data.
64 bytes from 10.255.0.2: icmp_seq=1 ttl=63 time=0.301 ms
64 bytes from 10.255.0.2: icmp_seq=2 ttl=63 time=0.300 ms
64 bytes from 10.255.0.2: icmp_seq=3 ttl=63 time=0.306 ms
64 bytes from 10.255.0.2: icmp_seq=4 ttl=63 time=0.303 ms
64 bytes from 10.255.0.2: icmp_seq=5 ttl=63 time=0.304 ms
14:44:41:306930: virtio-input                                                                                                                                                                                                                               
  virtio: hw_if_index 2 next-index 4 vring 0 len 102                                                                                                                                                                                                        
    hdr: flags 0x00 gso_type 0x00 hdr_len 0 gso_size 0 csum_start 0 csum_offset 0 num_buffers 1                                                                                                                                                             
14:44:41:306933: ethernet-input                                                                                                                                                                                                                             
  frame: flags 0x1, hw-if-index 2, sw-if-index 2                                                                                                                                                                                                            
  MPLS: 52:54:00:01:01:00 -> 52:54:00:02:01:00                                                                                                                                                                                                              
14:44:41:306936: mpls-input                                                                                                                                                                                                                                 
  MPLS: next BUG![3]  label 0 ttl 64 exp 0                                                                                                                                                                                                                  
14:44:41:306938: linux-cp-xc-mpls                                                                                                                                                                                                                           
  lcp-xc: itf:1 adj:10                                                                                                                                                                                                                                      
14:44:41:306942: eth1-output                                                                                                                                                                                                                                
  eth1 flags 0x00180005                                                                                                                                                                                                                                     
  MPLS: 52:54:00:01:01:00 -> 52:54:00:02:01:00                                                                                                                                                                                                              
  label 0 exp 0, s 1, ttl 64                                                                                                                                                                                                                                
14:44:41:306944: eth1-tx                                                                                                                                                                                                                                    
  eth1 tx queue 0                                                                                                                                                                                                                                           
  buffer 0x9d64f: current data 0, length 102, buffer-pool 0, ref-count 1, trace handle 0x4                                                                                                                                                                  
                  l2-hdr-offset 0 l3-hdr-offset 14                                                                                                                                                                                                          
  PKT MBUF: port 65535, nb_segs 1, pkt_len 102                                                                                                                                                                                                              
    buf_len 2176, data_len 102, ol_flags 0x0, data_off 128, phys_addr 0x4359440                                                                                                                                                                             
    packet_type 0x0 l2_len 0 l3_len 0 outer_l2_len 0 outer_l3_len 0                                                                                                                                                                                         
    rss 0x0 fdir.hi 0x0 fdir.lo 0x0                                                                                                                                                                                                                         
  MPLS: 52:54:00:01:01:00 -> 52:54:00:02:01:00                                                                                                                                                                                                              
  label 0 exp 0, s 1, ttl 64

Details

Version
VyOS 1.5-rolling-202610191432
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

I reproduced this on a lab pair (VPP router plus a kernel router, LDP over eth0). set protocols mpls interface eth0 only sets the kernel side (/proc/sys/net/mpls/conf/eth0/input). In VPP the feature stays at mpls-not-enabled and show errors counts mpls-input: MPLS not enabled.

Two details from the lab:

  • vppctl set interface mpls eth0 enable is enough. linux-cp (lcp_mpls_sync) enables MPLS on the tap of the pair itself and sets the kernel sysctl, so the second command from the workaround is not needed.
  • On a router that has no labeled route yet the command fails with default MPLS table must be created first. VyOS has to create table 0 first.

Fix: protocols mpls enables MPLS in VPP for its interfaces (and disables it when they are removed), and the vpp commit applies it again after a VPP restart, because the state is lost then. With it LDP is operational and the ping over the explicit-null route works (0 % loss, 100 % loss with MPLS disabled in VPP). The PR is vyos/vyos-1x#5595 (draft for now, there are already 5 open PRs of mine).

@a.pidnebesny the fix is in the draft PR https://github.com/vyos/vyos-1x/pull/5595. If you want to test it before it is merged, there is no image yet, but you can apply it to a running lab router: the attached T9518-vpp-mpls-enable.patch (three Python files) plus one line in a JSON file, with a backup and a revert. The steps are in the attached T9518-test-instructions.md.

What I would like to know: show version, the output of vppctl show mpls interface before and after, and whether your ping and LDP forwarding work without the two manual vppctl set interface mpls ... enable commands. The instructions also test a VPP restart and the removal of the interface.

I tested it on a lab pair with the 2026.10.16-0024-rolling image (VPP v25.10.0-60, FRR 10.7.1), the details are in the instructions. Other versions and bonding or VLAN interfaces are not tested.

Viacheslav changed the task status from Open to In progress.Tue, Oct 27, 12:43 PM
Viacheslav assigned this task to rherold.
Viacheslav triaged this task as Normal priority.