Hello my friend,
As I’m told in the first article about BGP, I’ll be returning to this protocol many times in future. Today I’ll cover very interesting topic (at least in my opinion) that is called BGP Label Unicast (BGP-LU). Let’s see what is it about and how it can be configured.
Disclaimer
Thanks to colleague of mine, Greg Hankins, I’ve updated my lab to the latest SR OS version – 14.0.R4. And I’ve spotted there are several major differences in configuration of BGP labeled unicast (BGP-LU) comparing to 13.0.R1 that I’ve used before. The difference is almost the same in terms of configuration as between Cisco IOS and Cisco IOS XR. Refer to this book for examples of configuration of BGP-LU prior to version 14.
Before we begin
You might expect that we’ll talk about BGP/MPLS VPNs in the article, because I’ve mentioned labeled, what definitely means MPLS. No, we won’t. BGP-LU is used to distribute labels via BGP for address family IPv4/IPv6 unicast (AFI/SAFI 1/4 and 2/4) and to build MPLS forwarding plane (i.E. BGP-LU distributes transport labels). BGP/MPLS VPNs deal with address family VPNv4/VPNv6 unicast/multicast (AFI/SAFI 1/128 and 2/128) and is used to distribute labels for certain L3 VPNs (VPRN/VRF). There are four most widely used cases for BGP labeled unicast:
- Inter-AS MPLS VPN Option C;
- Seamless MPLS (Unified MPLS) in service provider network;
- Carrier Supporting Carrier (CSC) VPN;
- IGP Free-data center.
In the first three cases, BGP-LU is built on top of ready MPLS network (LDP, RSVP or SR) in order to create a hierarchical LSP (Labeled Switched Path) across different IGP domains. This is necessary to provide scalability and resiliency in big service providers’ networks. More information you can find in this IETF draft.
The latest scenario implies using only BGP for routing inside the data center due to its high level of scalability and flexibility. More information on that is this IETF draft .
In our lab we’ll use the latter case, so we’ll build an IGP-free datacenter using BGP labeled unicast.
Topology
The physical topology doesn’t change and we continue to use the previous one:
The logical topology is built with extensive use of VPRN (for Nokia (Alcatel-Lucent) SR OS) and VRF (for Cisco IOS XR). The reason for that is that we’ll have 6 virtual routers will functional MPLS data plane and therefore we’ll have a 5-stage fabric for data center:
In order to make it working, special configuration for VPRNs at Nokia (Alcatel-Lucent) VSR (SR 7750) is needed. Nevertheless if you have enough computing resources, you can make a simple configuration without any VPRNs/VRFs. The initial topology for our lab you can find here: linux SR1_initial SR3_initial XR1_initial
If you carefully review the initial configs, you can find significant difference comparing to first BGP article for virtual routers (VPRNs) in Nokia (Alcatel-Lucent) SR OS. Here we have to enable MPLS in VPRN, that’s why the configuration is different.
Overall architecture
On top of the IPv4/IPv6 addressing it’s necessary to define, which prefix should be transferred with labeled and which without. The picture above helps you to understand, how BGP sessions should be configured:
In order to achieve good level of flexibility and scalability, I’m going to use BGP community. Extensive use of reg-exps (UNIX regular expressions) in route policies ease the application of certain actions to prefixes:
- All prefixes that should be announced via BGP labeled unicast meaning the prefixes that have MPLS label (AFI/SAFI 1/4 in our case) have community ending with “:1”.
- All prefixes that should be announced via BGP unlabeled unicast (AFI/SAFI 1/1 for IPv4 and 2/1 for IPv6) have community ending with “:5”.
Based on these communities we establish route policies that allow or deny prefixes.
BGP Labeled Unicast (BGP-LU)
As we’ve said in the very beginning, BGP is used in this article in order to build MPLS forwarding plane and BGP is used to deliver MPLS transport label.
Don’t be afraid of big amount of configuration below. It’s the same across all devices.
Nokia (Alcatel-Lucent) VSR (SR 7750) | Cisco IOS XR (ASR 9000) |
VPRN 65001 (SPINE1) | VRF SPINE2 |
A:SR1>config>router>policy-options# info |
RP/0/0/CPU0:XR1(config)#show conf |
VPRN 65010 (LEAF1) | |
A:SR3>config>router>policy-options# info |
|
VPRN 65020 (LEAF2) | |
A:SR3>config>router>policy-options# info |
|
VPRN 65100 (TOR1) | VRF TOR2 |
A:SR1>config>router>policy-options# info |
RP/0/0/CPU0:XR1(config)#show conf |
Despite the long configuration, everything we do is just announce looback of each router with community “AS:1” and establish BGP neighboring for AFI/SAFI 1/4, what corresponds address-family IPv4 labeled unicast. Also we make filtering in order to send and receive only prefixes with community “AS:1” through such BGP-LU peering.
Static routes in Cisco IOS XR is necessary. Refer to lessons learned for explanation.
If you have configured the part above correctly, you’ll see corresponding messages in the log:
SR OS: |
The BGP sessions are established for address family IPv4 labeled-unicast. Nokia (Alcatel-Lucent) SR OS tells about it in the following way:
A:SR1# show router 65001 bgp summary |
In Cisco you mention AFI/SAFI during checking neighbors. If you miss it, you won’t see any neighbors:
RP/0/0/CPU0:XR1#show bgp vrf SPINE2 ipv4 labeled-unicast summary |
The next important point in verifying BGP MPLS operation is to check labels:
A:SR1# show router 65001 bgp routes label-ipv4 |
You can see that each router advertises all routes and labels but in LFIB is installed only label for the best route.
A:SR1# show router 65001 fib 1 |
In Cisco IOS XR you will check labels received by BGP and LFIB with the following commands:
show bgp vrf SPINE2 ipv4 labeled-unicast labels |
If you want, you can make some ping/traceroute tests to check connectivity. In general all routers know about all “transport” loopbacks, so such tests must be successful.
Vanilla BGP (unlabeled BGP)
Let’s recall BGP topology:
As routers for address-family IPv4 unicast don’t connect to each other directly, we built ebgp-multihop session. Source IPv4 addresses for peering are loobacks, which have announced with community “AS:1”. So the main Idea is to send traffic from Lo999 at VPRN 65100 to Lo999 at VRF TOR2 through MPLS data plane, built between Lo100 addresses. We announce Lo999 prefixes with community “AS:5” in order to make proper filtering.
Let’s create this configuration:
Nokia (Alcatel-Lucent) VSR (SR 7750) | Cisco IOS XR (ASR 9000) |
VPRN 65001 (SPINE1) | VRF SPINE2 |
A:SR1>config>router>policy-options# info |
RP/0/0/CPU0:XR1(config)#show conf |
VPRN 65100 (TOR1) | VRF TOR2 |
A:SR1>config>router>policy-options# info |
RP/0/0/CPU0:XR1(config)#show conf |
The configuration above is quite simple and follow the task. The good part of the story is that we have established BGPv4 unlabeled unicast session and even announced prefixes:
A:SR1# show router 65001 bgp summary |
The bad part of the story is that I have to use VPRN/VRF, what leads to a numerous limitations. In Nokia (Alcatel-Lucent) SR OS it’s necessary to activate additional feature in BGP in order to provide possibility of resolving BGP next-hop through another BGP route. This feature isn’t available in VPRN; it’s allowed only in global configuration. Absence of this feature leads to the following problem:
A:SR1# show router 65100 bgp routes ipv4 detail | match Ne |
Cisco IOS XR by default use reverse lookup for BGP routes as well so you can see this new routes at TOR2:
RP/0/0/CPU0:XR1#show bgp vrf TOR2 ipv4 uni | inc 172 |
So I can’t show you bidirectional communication. Nevertheless our MPLS dataplane works. If we enable debug of ICMP packets and logging at VPRN 65100 and make ping from VRF TOR2, you see that packets:
A:SR1# configure log |
As you can imagine, there is no 172.16.x.0/24 routes at SPINE devices:
A:SR3# show router 65010 route-table |
Final configs are here: XR1_final SR3_final SR1_final
Lessons learned
Cisco IOS XR has a certain problem relating to MPLS. All next-hops for labels must be configured as host-routes (with prefix /32). As we have interconnected subnet with prefix /31, the MPLS forwarding plane doesn’t work from the very beginning:
RP/0/0/CPU0:XR1#show mpls forwarding vrf TOR2 |
In order to get BGP label working as transport labels as well, we need to manually configure such host-routes to BGP next-hop from the router update. Actually it’s just another IP address from the interconnected subnet. To do so we need to add static routes:
RP/0/0/CPU0:XR1(config)#show conf |
After such modification if RIB we get host-route to BGP NH and our MPLS forwarding plane starts working:
RP/0/0/CPU0:XR1(config-static-vrf-afi)#do show mpls forwarding vrf TOR2 |
Conclusion
BGP is wonderful protocol. I don’t know, which protocol else has so many different options and flexibility. It can be very easy and straightforward, or it can be really complex. It depends only on your design and skills. BGP labeled unicast is widely used in Service provider world and in high-scale Data Centers as well. For sure there are other options, like VXLAN, which also can be used as transport technology for DC (another option is MPLS). It’s good that we have so many options. And BGP-LU is definitely is one of the best one. Take care.
Support us
BR,
Anton Karneliuk
What are the differences between BGP and BGP-LU? Thanks sir.
Hi Nisa,
BGP is protocol. BGP-LU (labeled unicast) is just a specific address family that supports label switching for IPv4/IPv6 unicast prefixes. Here you can read RFC about it: https://www.rfc-editor.org/rfc/rfc3107.txt
BR,
Anton
Hi Anton,
The final configuration for SR1 looks odd to me. In bgp group “ebgp_ulu” the export/import routing policy is same which is “RP_BGP_ULU”.
In my opinion, the export routing policy should be “RP_BGP_AS65100_ULU_OUT”, what do you think ?
Hi Mr. Anton
I would like to ask, the different with the final configuration in this post and the post in “BGP between Nokia SR and Cisco iOS XR”. in the BGP post, in R3, the SAP is created as the logical port, while in this post you’re using “network-interface” and then attach the port into those interface.
Could you explain the differences between these two configuration ?
Thanks
Best Regards
Fakhri
Hello Fakhri,
The difference is MPLS, because MPLS can’t run on SAP. In the same BGP isn’t so critical and it can run both over SAP and network-interface.
Hope this helps.
BR,
Anton