Hello,

I am unable to get bird static routes with MPLS labels installed in the
kernel routing table on Centos 7 (with upgraded kernel 5.12).

Steps to set this up:

1. Load necessary MPLS kernel modules & sysctl setting
modprobe mpls_router
modprobe mpls_iptunnel
sysctl -w net.mpls.platform_labels=1048575

2. Install bird2
3. Set static route in bird configuration then birdc configure (Everything
else is default config)

[root@centos7 ~]$ cat /etc/bird.conf | grep "protocol static" -A 4
protocol static {
vrf default;
ipv4;
route 1.1.1.1/32 via "ens192" mpls 299792;
}
[cbutera@telegraf-edge001 ~]$ ip route ls 1.1.1.1
1.1.1.1 dev ens192 proto bird scope link metric 32
You can see in the output above that there is no encap mpls instruction on
the route

Following the same procedure on Debian 11 or Centos 8 work successfully.
See output below
[root@centos8 ~] cat /etc/bird.conf | grep "protocol static" -A 4
protocol static {
ipv4;
vrf default;
route 1.1.1.1/32 via "ens192" mpls 299792;
}
[root@localhost ~] ip route ls 1.1.1.1
1.1.1.1 encap mpls 299792 dev ens192 proto bird scope link metric 32


Note: On Centos 7 adding the route with ip route add command works - Also
confirmed that the server is in fact sending packets with MPLS labels
[root@centos7 ~] ip route add 8.8.8.8/32 encap mpls 299793 dev ens192
[root@centos7 ~] ip route ls 8.8.8.8
8.8.8.8 encap mpls 299793 dev ens192 scope link


MPLS Kernel modules needed for this were introduced in Kernel version 4.3.
I have tested on the two versions listed below:

   - 5.12.9-1.el7.elrepo.x86_646.
   - 2.0-1.el7.elrepo.x86_64


Thanks you,
Charlie

Reply via email to