BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP
Dear support-team, In the BIRD 2.0 user guide, I see the support for RFC 3107 - Carrying Label information in BGP. We want to configure a VM with BIRD agent working like a PE for adding MPLS labels for IPv4 and IPv6 unicast routes. Do we have this configuration supported now, and can I get any sample working configuration for this please. Regards, Thiruvazhiyan
On Wed, May 23, 2018 at 06:02:30PM +0000, LAKSHMANAN, THIRUVAZHIYA wrote:
In the BIRD 2.0 user guide, I see the support for RFC 3107 - Carrying Label information in BGP. We want to configure a VM with BIRD agent working like a PE for adding MPLS labels for IPv4 and IPv6 unicast routes. Do we have this configuration supported now, and can I get any sample working configuration for this please.
Hi Unfortunately BIRD support for MPLS is currently limited. Can be used as a BGP route reflector, or can configure static MPLS routes (with static labels) and announce them. But no automatic route labeling. For example, see this config: https://gitlab.labs.nic.cz/labs/bird/blob/int-new/doc/bird.conf.example2 (although static routes there are VPN routes, it is analogous). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Ondrej, Thanks for the reply! How about incoming labels coming from 3107 neighbor? Can BIRD program the kernel table with mpls label for next-hop loopback? Regards, Thiruvazhiyan L -----Original Message----- From: Ondrej Zajicek [mailto:santiago@crfreenet.org] Sent: Wednesday, May 23, 2018 3:07 PM To: LAKSHMANAN, THIRUVAZHIYA; Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Wed, May 23, 2018 at 06:02:30PM +0000, LAKSHMANAN, THIRUVAZHIYA wrote:
In the BIRD 2.0 user guide, I see the support for RFC 3107 - Carrying Label information in BGP. We want to configure a VM with BIRD agent working like a PE for adding MPLS labels for IPv4 and IPv6 unicast routes. Do we have this configuration supported now, and can I get any sample working configuration for this please.
Hi Unfortunately BIRD support for MPLS is currently limited. Can be used as a BGP route reflector, or can configure static MPLS routes (with static labels) and announce them. But no automatic route labeling. For example, see this config: https://gitlab.labs.nic.cz/labs/bird/blob/int-new/doc/bird.conf.example2 (although static routes there are VPN routes, it is analogous). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
On Wed, May 23, 2018 at 07:40:26PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej, Thanks for the reply! How about incoming labels coming from 3107 neighbor? Can BIRD program the kernel table with mpls label for next-hop loopback?
Yes, incoming routes with labels received from RFC 3107 neighbor can be programmed to kernel IP table as routes with MPLS label for next-hop loopback (for outgoing traffic). Unfortunately, BIRD will not insert corresponding MPLS routes to kernel MPLS table (for incoming labelled traffic). Although this is probably not a problem for PE router, where either penultimate hop popping or static decapsulating MPLS routes can be used. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Ondrej, Thanks for your reply. What is the recommended linux kernel verison for mpls if BIRD acts as a PE. We have VM with Red Hat Enterprise Linux Server 7.3 (Maipo) Kernel 3.10.0-693.2.2.el7.x86_64 on an x86_64 And Bird 2.0.1 version, but it is not working. Can you please confirm whether the environment we have is supporting mpls. If not, what is the recommended kernel version. Regards, Thiruvazhiyan L -----Original Message----- From: Bird-users [mailto:bird-users-bounces@network.cz] On Behalf Of Ondrej Zajicek Sent: Wednesday, May 23, 2018 7:16 PM To: Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Wed, May 23, 2018 at 07:40:26PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej, Thanks for the reply! How about incoming labels coming from 3107 neighbor? Can BIRD program the kernel table with mpls label for next-hop loopback?
Yes, incoming routes with labels received from RFC 3107 neighbor can be programmed to kernel IP table as routes with MPLS label for next-hop loopback (for outgoing traffic). Unfortunately, BIRD will not insert corresponding MPLS routes to kernel MPLS table (for incoming labelled traffic). Although this is probably not a problem for PE router, where either penultimate hop popping or static decapsulating MPLS routes can be used. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
On Fri, Jun 08, 2018 at 04:03:41PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej, Thanks for your reply. What is the recommended linux kernel verison for mpls if BIRD acts as a PE.
We have VM with Red Hat Enterprise Linux Server 7.3 (Maipo) Kernel 3.10.0-693.2.2.el7.x86_64 on an x86_64
And Bird 2.0.1 version, but it is not working. Can you please confirm whether the environment we have is supporting mpls. If not, what is the recommended kernel version.
Hi I think that 2.0.1 is OK, i don't there is any related bugfix in 2.0.2. But your kernel is probably too old, MPLS forwarding is rather recent feature. You should check that you can doo MPLS routes with basic iproute2 commands (so you have recent kernel and iproute2 tools): https://stackoverflow.com/questions/31926342/iproute2-commands-for-mpls-conf... -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Ondrej, Thanks for your reply. The link which is provided in your emails details about the static MPLS route entry to the MPLS route table. When we have our VM with the latest kernel, whether BIRD can program the incoming 3107 routes to the MPLS Kernel table automatically, or do we need to make static entries in the kernel table? Regards, Thiruvazhiyan L -----Original Message----- From: Bird-users [mailto:bird-users-bounces@network.cz] On Behalf Of Ondrej Zajicek Sent: Friday, June 8, 2018 3:26 PM To: Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Fri, Jun 08, 2018 at 04:03:41PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej, Thanks for your reply. What is the recommended linux kernel verison for mpls if BIRD acts as a PE.
We have VM with Red Hat Enterprise Linux Server 7.3 (Maipo) Kernel 3.10.0-693.2.2.el7.x86_64 on an x86_64
And Bird 2.0.1 version, but it is not working. Can you please confirm whether the environment we have is supporting mpls. If not, what is the recommended kernel version.
Hi I think that 2.0.1 is OK, i don't there is any related bugfix in 2.0.2. But your kernel is probably too old, MPLS forwarding is rather recent feature. You should check that you can doo MPLS routes with basic iproute2 commands (so you have recent kernel and iproute2 tools): https://urldefense.proofpoint.com/v2/url?u=https-3A__stackoverflow.com_quest... -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
On Mon, Jun 11, 2018 at 04:21:10PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej,
Thanks for your reply. The link which is provided in your emails details about the static MPLS route entry to the MPLS route table. When we have our VM with the latest kernel, whether BIRD can program the incoming 3107 routes to the MPLS Kernel table automatically, or do we need to make static entries in the kernel table?
Hi BIRD can programu such routes automatically. The link with static routes that i provided can be useful to test your VM/kernel whether it is MPLS-ready, and for debugging. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Ondrej, Thanks for your reply. I have upgraded the kernel on my VM and now I am getting the 3107 routes in the mtab4 table in the bird. But the routes are not programed to mpls Kernel table. Maybe I am missing some configuration in the bird.conf. can you please help. Below is the bird.conf that I am using, router id 198.51.101.10; ipv4 table master4; ipv6 table master6; ipv4 table mtab4; ipv6 table mtab6; protocol kernel { persist; scan time 10; ipv4 { export all; import all; }; } protocol direct { ipv4 { export all; import all; }; interface "-eth*", "*"; } protocol device { scan time 10; # Scan interfaces every 10 seconds } protocol bgp { local 10.10.101.2 as 65110; # Use a private AS number neighbor 10.10.101.1 as 65001; # Our neighbor ... ipv4 { table master4; export all; import all; next hop self; # advertise this router as next hop }; # IPv4 with MPLS labels (1/4) ipv4 mpls { # explicit IPv4 table table mtab4; import all; export all; }; } Below is the routes in the bird, bird> show route Table master4: 10.10.101.0/24 unicast [direct1 14:01:19.209] * (240) dev bond0.11 135.21.13.160/28 unicast [direct1 14:01:19.209] * (240) dev ens3 bird> show route table mtab4 ============> BGP 3107 - MPLS label routes on the bird Table mtab4: 1.0.1.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1031 1.0.0.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1030 1.0.3.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1033 1.0.2.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1032 1.0.5.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1035 1.0.4.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1034 1.0.7.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1037 1.0.6.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1036 1.0.9.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1039 1.0.8.0/24 unicast [bgp1 17:17:10.458] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1038 bird> below is the routes in the kernel tables, root@ubuntu4-4-VM1:/usr/local/etc# ip -f mpls route show ========> no label routes in this output 300 dev lo root@ubuntu4-4-VM1:/usr/local/etc# ip -f inet route show default via 135.21.13.161 dev ens3 onlink 10.10.101.0/24 dev bond0.11 proto kernel scope link src 10.10.101.2 10.10.101.0/24 dev bond0.11 proto bird scope link metric 32 135.21.13.160/28 dev ens3 proto kernel scope link src 135.21.13.165 135.21.13.160/28 dev ens3 proto bird scope link metric 32 root@ubuntu4-4-VM1:/usr/local/etc# below is the VM details, root@ubuntu4-4-VM1:/usr/local/etc# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial root@ubuntu4-4-VM1:/usr/local/etc# uname -r 4.4.0-119-generic root@ubuntu4-4-VM1:/usr/local/etc# Regards, Thiruvazhiyan L -----Original Message----- From: Ondrej Zajicek [mailto:santiago@crfreenet.org] Sent: Friday, June 8, 2018 3:26 PM To: Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Fri, Jun 08, 2018 at 04:03:41PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej,
Thanks for your reply. What is the recommended linux kernel verison for mpls if BIRD acts as a PE.
We have VM with Red Hat Enterprise Linux Server 7.3 (Maipo)
Kernel 3.10.0-693.2.2.el7.x86_64 on an x86_64
And Bird 2.0.1 version, but it is not working. Can you please confirm whether the environment we have is supporting mpls. If not, what is the recommended kernel version.
Hi I think that 2.0.1 is OK, i don't there is any related bugfix in 2.0.2. But your kernel is probably too old, MPLS forwarding is rather recent feature. You should check that you can doo MPLS routes with basic iproute2 commands (so you have recent kernel and iproute2 tools): https://stackoverflow.com/questions/31926342/iproute2-commands-for-mpls-conf... -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
On Wed, Jun 13, 2018 at 09:33:56PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej,
Thanks for your reply. I have upgraded the kernel on my VM and now I am getting the 3107 routes in the mtab4 table in the bird. But the routes are not programed to mpls Kernel table. Maybe I am missing some configuration in the bird.conf. can you please help.
Below is the bird.conf that I am using,
Hi You have two pairs of routing tables (master4/6 and mtab4/6), BGP is connected to both (regular to master4/6 and 3107 to mtab4/6). But only the master4/6 is connected by kernel protocol to the real kernel routing table. You probably do not need regular BGP, only RFC 3107 (there are no routes in master4/6 other than from Direct protocol). So you should: Remove additional routing tables: ipv4 table mtab4; ipv6 table mtab6; Remove 'ipv4' block in BGP, keep only 'ipv4 mpls' block (RFC 3107 routes) Remove 'table mtab4' from 'ipv4 mpls' block. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Thanks Ondrej, With your suggested changes, I notice both Kernel and BGP uses single table (master4) and both have the routes. However, the routes shown in the bird has labels attached to them, the routes shown in Kernel table do not show the labels to them. bird> show route Table master4: 1.0.1.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1001 1.0.0.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1000 1.0.3.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1003 1.0.2.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1002 1.0.5.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1005 1.0.4.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1004 1.0.7.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1007 1.0.6.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1006 1.0.9.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1009 1.0.8.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i] via 10.10.101.1 on bond0.11 mpls 1008 10.10.101.0/24 unicast [direct1 11:48:09.102] * (240) dev bond0.11 135.21.13.160/28 unicast [direct1 11:46:40.209] * (240) dev ens3 bird> root@ubuntu4-4-VM1:/usr/local/etc# ip -f mpls route show 100 as to 200 via inet 192.168.2.2 dev ens3 300 dev lo root@ubuntu4-4-VM1:/usr/local/etc# ip -f inet route show default via 135.21.13.161 dev ens3 onlink 1.0.0.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.1.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.2.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.3.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.4.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.5.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.6.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.7.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.8.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.9.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 10.10.101.0/24 dev bond0.11 proto kernel scope link src 10.10.101.2 10.10.101.0/24 dev bond0.11 proto bird scope link metric 32 135.21.13.160/28 dev ens3 proto kernel scope link src 135.21.13.165 135.21.13.160/28 dev ens3 proto bird scope link metric 32 root@ubuntu4-4-VM1:/ bird> show protocols all Name Proto Table State Since Info kernel1 Kernel master4 up 11:46:40.203 Channel ipv4 State: UP Table: master4 Preference: 10 Input filter: ACCEPT Output filter: ACCEPT Routes: 0 imported, 12 exported Route change stats: received rejected filtered ignored accepted Import updates: 0 0 0 0 0 Import withdraws: 0 0 --- 0 0 Export updates: 13 0 0 --- 13 Export withdraws: 1 --- --- --- 1 direct1 Direct --- up 11:46:40.203 Channel ipv4 State: UP Table: master4 Preference: 240 Input filter: ACCEPT Output filter: ACCEPT Routes: 2 imported, 0 exported Route change stats: received rejected filtered ignored accepted Import updates: 3 0 0 0 3 Import withdraws: 1 0 --- 0 1 Export updates: 0 0 0 --- 0 Export withdraws: 0 --- --- --- 0 device1 Device --- up 11:46:40.203 bgp1 BGP --- up 11:48:56.087 Established BGP state: Established Neighbor address: 10.10.101.1 Neighbor AS: 65001 Neighbor ID: 192.0.0.1 Local capabilities Multiprotocol AF announced: ipv4-mpls Route refresh Graceful restart 4-octet AS numbers Enhanced refresh Neighbor capabilities Multiprotocol AF announced: vpn4-mpls ipv4-mpls Session: external Source address: 10.10.101.2 Hold timer: 66.292/90 Keepalive timer: 21.935/30 Channel ipv4-mpls State: UP Table: master4 Preference: 100 Input filter: ACCEPT Output filter: ACCEPT Routes: 10 imported, 2 exported Route change stats: received rejected filtered ignored accepted Import updates: 10 0 0 0 10 Import withdraws: 0 0 --- 0 0 Export updates: 12 10 0 --- 2 Export withdraws: 0 --- --- --- 0 BGP Next hop: 10.10.101.2 bird> root@ubuntu4-4-VM1:/usr/local/etc# more bird.conf router id 198.51.101.10; ipv4 table master4; ipv6 table master6; protocol kernel { persist; scan time 10; ipv4 { export all; import all; }; } protocol direct { ipv4 { export all; import all; }; interface "-eth*", "*"; } protocol device { scan time 10; # Scan interfaces every 10 seconds } protocol bgp { local 10.10.101.2 as 65110; # Use a private AS number neighbor 10.10.101.1 as 65001; # Our neighbor ... # IPv4 with MPLS labels (1/4) ipv4 mpls { # explicit IPv4 table import all; export all; next hop self; # advertise this router as next hop }; } root@ubuntu4-4-VM1:/usr/local/etc# Regards, Thiruvazhiyan L -----Original Message----- From: Ondrej Zajicek [mailto:santiago@crfreenet.org] Sent: Thursday, June 14, 2018 9:08 AM To: Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Wed, Jun 13, 2018 at 09:33:56PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej,
Thanks for your reply. I have upgraded the kernel on my VM and now I am getting the 3107 routes in the mtab4 table in the bird. But the routes are not programed to mpls Kernel table. Maybe I am missing some configuration in the bird.conf. can you please help.
Below is the bird.conf that I am using,
Hi You have two pairs of routing tables (master4/6 and mtab4/6), BGP is connected to both (regular to master4/6 and 3107 to mtab4/6). But only the master4/6 is connected by kernel protocol to the real kernel routing table. You probably do not need regular BGP, only RFC 3107 (there are no routes in master4/6 other than from Direct protocol). So you should: Remove additional routing tables: ipv4 table mtab4; ipv6 table mtab6; Remove 'ipv4' block in BGP, keep only 'ipv4 mpls' block (RFC 3107 routes) Remove 'table mtab4' from 'ipv4 mpls' block. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
There are switches in the code to drop MPLS labels when the kernel doesn't support it. If you run $ grep '^#define HAVE_MPLS_KERNEL' config.log (config.log is a product of ./configure) it should show that it is defined to 1. If not, try running ./configure to check whether it shows you Kernel MPLS Support: yes If not, install also kernel headers for your current kernel. Maria On 06/14/2018 08:13 PM, Thiruvazhiyan Lakshmanan wrote:
Thanks Ondrej,
With your suggested changes, I notice both Kernel and BGP uses single table (master4) and both have the routes. However, the routes shown in the bird has labels attached to them, the routes shown in Kernel table do not show the labels to them.
bird> show route
Table master4:
1.0.1.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1001
1.0.0.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1000
1.0.3.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1003
1.0.2.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1002
1.0.5.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1005
1.0.4.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1004
1.0.7.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1007
1.0.6.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1006
1.0.9.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1009
1.0.8.0/24 unicast [bgp1 11:48:56.097] * (100) [AS65001i]
via 10.10.101.1 on bond0.11 mpls 1008
10.10.101.0/24 unicast [direct1 11:48:09.102] * (240)
dev bond0.11
135.21.13.160/28 unicast [direct1 11:46:40.209] * (240)
dev ens3
bird>
root@ubuntu4-4-VM1:/usr/local/etc# ip -f mpls route show
100 as to 200 via inet 192.168.2.2 dev ens3
300 dev lo
root@ubuntu4-4-VM1:/usr/local/etc# ip -f inet route show
default via 135.21.13.161 dev ens3 onlink
1.0.0.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.1.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.2.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.3.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.4.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.5.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.6.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.7.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.8.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
1.0.9.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32
10.10.101.0/24 dev bond0.11 proto kernel scope link src 10.10.101.2
10.10.101.0/24 dev bond0.11 proto bird scope link metric 32
135.21.13.160/28 dev ens3 proto kernel scope link src 135.21.13.165
135.21.13.160/28 dev ens3 proto bird scope link metric 32
root@ubuntu4-4-VM1:/
bird> show protocols all
Name Proto Table State Since Info
kernel1 Kernel master4 up 11:46:40.203
Channel ipv4
State: UP
Table: master4
Preference: 10
Input filter: ACCEPT
Output filter: ACCEPT
Routes: 0 imported, 12 exported
Route change stats: received rejected filtered ignored accepted
Import updates: 0 0 0 0 0
Import withdraws: 0 0 --- 0 0
Export updates: 13 0 0 --- 13
Export withdraws: 1 --- --- --- 1
direct1 Direct --- up 11:46:40.203
Channel ipv4
State: UP
Table: master4
Preference: 240
Input filter: ACCEPT
Output filter: ACCEPT
Routes: 2 imported, 0 exported
Route change stats: received rejected filtered ignored accepted
Import updates: 3 0 0 0 3
Import withdraws: 1 0 --- 0 1
Export updates: 0 0 0 --- 0
Export withdraws: 0 --- --- --- 0
device1 Device --- up 11:46:40.203
bgp1 BGP --- up 11:48:56.087 Established
BGP state: Established
Neighbor address: 10.10.101.1
Neighbor AS: 65001
Neighbor ID: 192.0.0.1
Local capabilities
Multiprotocol
AF announced: ipv4-mpls
Route refresh
Graceful restart
4-octet AS numbers
Enhanced refresh
Neighbor capabilities
Multiprotocol
AF announced: vpn4-mpls ipv4-mpls
Session: external
Source address: 10.10.101.2
Hold timer: 66.292/90
Keepalive timer: 21.935/30
Channel ipv4-mpls
State: UP
Table: master4
Preference: 100
Input filter: ACCEPT
Output filter: ACCEPT
Routes: 10 imported, 2 exported
Route change stats: received rejected filtered ignored accepted
Import updates: 10 0 0 0 10
Import withdraws: 0 0 --- 0 0
Export updates: 12 10 0 --- 2
Export withdraws: 0 --- --- --- 0
BGP Next hop: 10.10.101.2
bird>
root@ubuntu4-4-VM1:/usr/local/etc# more bird.conf
router id 198.51.101.10;
ipv4 table master4;
ipv6 table master6;
protocol kernel {
persist;
scan time 10;
ipv4 {
export all;
import all;
};
}
protocol direct {
ipv4 {
export all;
import all;
};
interface "-eth*", "*";
}
protocol device {
scan time 10; # Scan interfaces every 10 seconds
}
protocol bgp {
local 10.10.101.2 as 65110; # Use a private AS number
neighbor 10.10.101.1 as 65001; # Our neighbor ...
# IPv4 with MPLS labels (1/4)
ipv4 mpls {
# explicit IPv4 table
import all;
export all;
next hop self; # advertise this router as next hop
};
}
root@ubuntu4-4-VM1:/usr/local/etc#
Regards,
Thiruvazhiyan L
-----Original Message----- From: Ondrej Zajicek [mailto:santiago@crfreenet.org] Sent: Thursday, June 14, 2018 9:08 AM To: Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP
On Wed, Jun 13, 2018 at 09:33:56PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej,
Thanks for your reply. I have upgraded the kernel on my VM and now I am getting the 3107 routes in the mtab4 table in the bird. But the routes are not programed to mpls Kernel table. Maybe I am missing some configuration in the bird.conf. can you please help.
Below is the bird.conf that I am using,
Hi
You have two pairs of routing tables (master4/6 and mtab4/6), BGP is
connected to both (regular to master4/6 and 3107 to mtab4/6). But only
the master4/6 is connected by kernel protocol to the real kernel routing
table.
You probably do not need regular BGP, only RFC 3107 (there are no routes
in master4/6 other than from Direct protocol). So you should:
Remove additional routing tables:
ipv4 table mtab4;
ipv6 table mtab6;
Remove 'ipv4' block in BGP, keep only 'ipv4 mpls' block (RFC 3107 routes)
Remove 'table mtab4' from 'ipv4 mpls' block.
--
Elen sila lumenn' omentielvo
Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================
On Thu, Jun 14, 2018 at 06:13:57PM +0000, Thiruvazhiyan Lakshmanan wrote:
Thanks Ondrej,
With your suggested changes, I notice both Kernel and BGP uses single table (master4) and both have the routes. However, the routes shown in the bird has labels attached to them, the routes shown in Kernel table do not show the labels to them.
Hi You could also check if you have proper kernel and tools. If you add the route manually: ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1 You should check if yuo see it with label using 'ip route show'. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Thanks for your reply. When I tried to add " ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1" I get "Error: either "to" is duplicate, or "encap" is a garbage." root@ubuntu4-4-VM1:/proc/sys/net# ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1 Error: either "to" is duplicate, or "encap" is a garbage. root@ubuntu4-4-VM1:/proc/sys/net# and "ip route show" command do not show any labels to the route's output, root@ubuntu4-4-VM1:/proc/sys/net# ip route show default via 135.21.13.161 dev ens3 onlink 1.0.0.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.1.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.2.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.3.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.4.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.5.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.6.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.7.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.8.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 1.0.9.0/24 via 10.10.101.1 dev bond0.11 proto bird metric 32 10.10.101.0/24 dev bond0.11 proto kernel scope link src 10.10.101.2 10.10.101.0/24 dev bond0.11 proto bird scope link metric 32 135.21.13.160/28 dev ens3 proto kernel scope link src 135.21.13.165 135.21.13.160/28 dev ens3 proto bird scope link metric 32 root@ubuntu4-4-VM1:/proc/sys/net# we have following kernel version, does it require any additional Kernel tool. root@ubuntu4-4-VM1:/proc/sys/net# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial root@ubuntu4-4-VM1:/proc/sys/net# uname -r 4.4.0-119-generic root@ubuntu4-4-VM1:/proc/sys/net# Regards, Thiruvazhiyan L -----Original Message----- From: Ondrej Zajicek [mailto:santiago@crfreenet.org] Sent: Thursday, June 14, 2018 5:43 PM To: Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Thu, Jun 14, 2018 at 06:13:57PM +0000, Thiruvazhiyan Lakshmanan wrote:
Thanks Ondrej,
With your suggested changes, I notice both Kernel and BGP uses single table (master4) and both have the routes. However, the routes shown in the bird has labels attached to them, the routes shown in Kernel table do not show the labels to them.
Hi You could also check if you have proper kernel and tools. If you add the route manually: ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1 You should check if yuo see it with label using 'ip route show'. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
On Fri, Jun 15, 2018 at 02:27:52PM +0000, Thiruvazhiyan Lakshmanan wrote:
Thanks for your reply.
When I tried to add " ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1" I get "Error: either "to" is duplicate, or "encap" is a garbage."
root@ubuntu4-4-VM1:/proc/sys/net# ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1 Error: either "to" is duplicate, or "encap" is a garbage. root@ubuntu4-4-VM1:/proc/sys/net#
In that case you likely have too old iproute2 tools, so you would not see mpls labels in 'ip route show'. You should get: # ip route add 192.168.1.0/24 encap mpls 100 via inet 192.168.81.2 # ip route list default via 192.168.81.1 dev eth0 192.168.1.0/24 encap mpls 100 via 192.168.81.2 dev eth0 -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hi Ondrej, Thanks for your advice, with the updated iproute2 package, I can see the mpls routes in the table now. I need another help now, I am trying to advertise the loopback interface addresses to the labeled unicast BGP peer with label value of 3 (Implicit null), but unable to do it. I am trying to create a static label route and advertise to the label unicast bgp peer, but I still see the routes received in the unicast table in the peer. Below are my loopback interfaces, root@ubuntu4-4-VM1:/usr/local/etc# ifconfig lo:1 lo:1 Link encap:Local Loopback inet addr:10.10.100.1 Mask:255.255.255.255 UP LOOPBACK RUNNING MTU:65536 Metric:1 root@ubuntu4-4-VM1:/usr/local/etc# ifconfig lo:10 lo:10 Link encap:Local Loopback inet addr:10.10.100.10 Mask:255.255.255.255 UP LOOPBACK RUNNING MTU:65536 Metric:1 root@ubuntu4-4-VM1:/usr/local/etc# and below is my bird.conf file, root@ubuntu4-4-VM1:/usr/local/etc# more bird.conf router id 135.21.13.165; ipv4 table master4; ipv6 table master6; #ipv4 table mtab4; #ipv6 table mtab6; protocol kernel { persist; scan time 10; ipv4 { export all; import all; }; } protocol direct { ipv4 { export all; import all; }; interface "-eth*", "*"; } protocol device { scan time 10; # Scan interfaces every 10 seconds } protocol static static4 { ipv4; route 10.10.100.10/32 via 10.10.101.38 mpls 3; } protocol bgp label_unicast{ local 10.10.101.38 as 7018; # Use a private AS number neighbor 10.10.101.37 as 7018; # Our neighbor ... # IPv4 with MPLS labels (1/4) ipv4 mpls { import all; export where proto = "static4"; next hop self; # advertise this router as next hop }; } protocol bgp unicast{ local 10.10.101.42 as 7018; # Use a private AS number neighbor 10.10.101.41 as 7018; # Our neighbor ... ipv4 { import all; export all; next hop self; # advertise this router as next hop }; } root@ubuntu4-4-VM1:/usr/local/etc# ifconfig lo:1 lo:1 Link encap:Local Loopback inet addr:10.10.100.1 Mask:255.255.255.255 UP LOOPBACK RUNNING MTU:65536 Metric:1 root@ubuntu4-4-VM1:/usr/local/etc# Regards, Thiruvazhiyan L -----Original Message----- From: Bird-users [mailto:bird-users-bounces@network.cz] On Behalf Of Ondrej Zajicek Sent: Friday, June 15, 2018 7:46 PM To: Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Fri, Jun 15, 2018 at 02:27:52PM +0000, Thiruvazhiyan Lakshmanan wrote:
Thanks for your reply.
When I tried to add " ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1" I get "Error: either "to" is duplicate, or "encap" is a garbage."
root@ubuntu4-4-VM1:/proc/sys/net# ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1 Error: either "to" is duplicate, or "encap" is a garbage. root@ubuntu4-4-VM1:/proc/sys/net#
In that case you likely have too old iproute2 tools, so you would not see mpls labels in 'ip route show'. You should get: # ip route add 192.168.1.0/24 encap mpls 100 via inet 192.168.81.2 # ip route list default via 192.168.81.1 dev eth0 192.168.1.0/24 encap mpls 100 via 192.168.81.2 dev eth0 -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
On Tue, Jun 26, 2018 at 08:23:37PM +0000, Thiruvazhiyan Lakshmanan wrote:
Hi Ondrej, Thanks for your advice, with the updated iproute2 package, I can see the mpls routes in the table now. I need another help now, I am trying to advertise the loopback interface addresses to the labeled unicast BGP peer with label value of 3 (Implicit null), but unable to do it. I am trying to create a static label route and advertise to the label unicast bgp peer, but I still see the routes received in the unicast table in the peer. ... protocol static static4 { ipv4; route 10.10.100.10/32 via 10.10.101.38 mpls 3; }
Hi This does not work, because "via IP mpls X" means that labes X is label assigned by IP. That label is announced when IP is announced as bgp_next_hop, but when 'next hop self' is used (or when local address is used as bgp_next_hop for other reasons) then local label (instead of label of IP) must be used, but BIRD currently does not support local label assignment, and such route is ignored. Attached patch fixes it so BIRD will use implicit-NULL automatically when route is announced with local next hop via MPLS-BGP. Compile BIRD with it. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Anno domini 2018 Thiruvazhiyan Lakshmanan scripsit: Hi,
When I tried to add " ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1" I get "Error: either "to" is duplicate, or "encap" is a garbage."
root@ubuntu4-4-VM1:/proc/sys/net# ip route add 192.168.1.0/24 encap mpls 100 via inet 10.10.101.1 Error: either "to" is duplicate, or "encap" is a garbage. [...]
Did you activate MPLS via sysctl? sysctl -w net.mpls.platform_labels=n where n is the highest MPLS label to be usable (integer) and sysctl -w net.mpls.conf.$iface.input=1 there $iface is/are the interface(s) to decapsulate MPLS labels on.
root@ubuntu4-4-VM1:/proc/sys/net# uname -r 4.4.0-119-generic
This should work as far as I know. Best Max -- "I have to admit I've always suspected that MTBWTF would be a more useful metric of real-world performance." -- Valdis Kletnieks on NANOG
Hi Obdrej, Thanks for your help, I have couple of questions. 1. Do we have this supported in bird 2.0.1 version or 2.0.2 version? 2. Other question is, I am currently running 2.0.1 version, is it possible to update the version to 2.0.2 version using any update command? Or do I need to uninstall 2.0.1 and reinstall 2.0.2? Thanks & Regards, Thiruvazhiyan L -----Original Message----- From: Ondrej Zajicek [mailto:santiago@crfreenet.org] Sent: Wednesday, May 23, 2018 3:07 PM To: LAKSHMANAN, THIRUVAZHIYA; Thiruvazhiyan Lakshmanan Cc: bird-users@network.cz Subject: Re: BIRD - Config Support for RFC 3107 - Carrying Label Information in BGP On Wed, May 23, 2018 at 06:02:30PM +0000, LAKSHMANAN, THIRUVAZHIYA wrote:
In the BIRD 2.0 user guide, I see the support for RFC 3107 - Carrying Label information in BGP. We want to configure a VM with BIRD agent working like a PE for adding MPLS labels for IPv4 and IPv6 unicast routes. Do we have this configuration supported now, and can I get any sample working configuration for this please.
Hi Unfortunately BIRD support for MPLS is currently limited. Can be used as a BGP route reflector, or can configure static MPLS routes (with static labels) and announce them. But no automatic route labeling. For example, see this config: https://urldefense.proofpoint.com/v2/url?u=https-3A__gitlab.labs.nic.cz_labs... (although static routes there are VPN routes, it is analogous). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so." ============================================================================================================================ Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html <http://www.techmahindra.com/Disclaimer.html> externally http://tim.techmahindra.com/tim/disclaimer.html <http://tim.techmahindra.com/tim/disclaimer.html> internally within TechMahindra. ============================================================================================================================
participants (5)
-
Jan Maria Matejka -
LAKSHMANAN, THIRUVAZHIYA -
Maximilian Wilhelm -
Ondrej Zajicek -
Thiruvazhiyan Lakshmanan