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, 5d02h29mvppctl
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 enabledWorkaround: 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