Unique RD per PE per VRF in MPLS

November 26, 2019
5 min read

OrhanErgun

Unique RD per PE per VRF is a deployment option in MPLS Layer 3 VPN.  

I am explaining this topic in deep detail in my “BGP Zero to Hero” course.  

In this post I will explain the different RD (Route Distinguisher) assignment options and at the end of the post, you will understand why you should assign unique RD per PE per VRF. Why RD (Route Distinguisher) is used in the first place ? RD is assigned on each and every VRF in MPLS Layer 3 VPN and it is used to make IP prefixes unique.

Let’s look at the below topology.

 

Figure - Unique RD per PE per VRF


Customer site is attached to two different PEs in the Service Provider network. Connecting the customer location to two different PE is a network best practice because it provides redundancy, thus increase availability of the customer service.  

When customer site is connected to PE device in MPLS, customer circuit is placed in a VRF. So dataplane segmentation is achieved, but in addition to that, RD (Route Distinguisher) value is added to IPv4 prefixes to create a unique VPNv4 prefixes.  

Imagine that this service provider has another customer which uses exactly the same IP address block with this customer, how service provider would differentiate the two in it’s network.

Same IP address would be problem , thus different addresses are created. But those different addresses are VPN addresses anymore, not the IP.  

The rule is IPv4 (32bit) + RD (64bit) = VPNv4 (96bit) Now you understand why RD is used. But why different/unique RD on the different PEs or as a term ‘ Why unique RD per PE per VRF ? ‘ Per VRF mean, per VPN or per customer. All are the same things. In the above topology, I used VPN Route Reflector intentionally to illustrate the possible problem if you wouldn’t use unique RD per PE per VRF. PE 1 and PE 2 is connected to same customer site. Same prefixes will be advertised to both PEs.

When PE1 and PE2 receives IP prefixes, if there is no specific BGP policy (Local Pref- MED etc.), by default both PEs would choose their customer connection link as the best, so PE 1 will tell to BGP that I am the best, PE2 will tell to BGP that I am the best.  

When both of these advertisements reach to BGP Route Reflectors, BGP Route Reflector will always choose only one best path and place that best path into the BGP and IP routing table and advertise to Route Reflector clients that path only.

In this case, PE3 would only receive one of the two possible exit point to the customer network.   But for many reasons, such as BGP PIC (BGP FRR), IBGP Multipath, Med Oscillation prevention, Hot Potato routing and so on, PE3 would need to have two of those available exit points (PE 1 and PE2 in our topology).   But RR doesn’t send unfortunately two of those paths, only one best path after best path calculation.   

Unique RD per PE per VRF here comes into play !  

When PE1 and PE2 are assigned with different RD values, BGP VPN Route Reflector doesn’t receive the same prefix anymore. Because with different RD, we created different prefixes.Yes we created VPN prefixes, that’s why the Route Reflector in MPLS VPN , is called VPN Route Reflector and it does the best path selection for the VPN prefixes.

Since with the different RDs we have different VPN prefixes, VPN Route Reflector doesn’t do best path selection comparison across this customer prefixes, PE3 receives the customer subnets with both PE1 and PE2 as exit point, next hop to this customer network.  

So, as you can understand now, unique RD per PE per vrf (per customer) is used to send the available exit points to the internal BGP speaker when there is route reflector in the MPLS network.  

If all these three PEs would be connected in a full mesh topology, then even with same RD per PE wouldn’t be an issue. But RR hides the path and we talked about it in the earlier posts.

OrhanErgun

About the Author

OrhanErgun

He created OrhanErgun.Net 10 years ago and has been serving the IT industry with his renowned and awarded training.

Wrote many books, mostly on Network Design, joined many IETF RFCs, gave Public talks at many Forums, and mentored thousands of his students.  

Today, with his carefully selected instructors, OrhanErgun.Net is providing IT courses to tens of thousands of IT engineers.

Share this Article

Related Articles

BGPJuly 18, 2026

What Is BGP? Border Gateway Protocol — The Complete Guide

Border Gateway Protocol (BGP) is the routing protocol that holds the Internet together. Every time a packet crosses from one provider's network to another — from your ISP to a...

Read Article
BGPOctober 15, 2024

Top 30 BGP Interview Questions You Need to Know in Networking

Border Gateway Protocol (BGP) is a fundamental subject for anyone diving into the networking sector, especially for those preparing for job interviews. Whether you are aiming for a role in...

Read Article
BGPOctober 15, 2024

BGP Fundamentals Explained: What You Should Understand Before Your Interview

BGP Fundamentals Explained: What You Should Understand Before Your Interview Heading into a job interview that involves discussing network technologies can be daunting. Among the various protocols you need to...

Read Article
BGPSeptember 7, 2024

Understanding BGP: What Port Does it Use and Why?

Ever wondered how the colossal network of the internet is managed? Or how data finds its way across complex networks reliably and efficiently? A significant part of the answer lies...

Read Article
BGPSeptember 7, 2024

Choosing the Right BGP Router ID: Best Practices

When managing complex network topologies, the selection of an efficient Border Gateway Protocol (BGP) Router ID becomes imperative. This decision can significantly impact the stability and performance of your network....

Read Article
BGPSeptember 7, 2024

BGP Split Horizon vs Route Poisoning: What's the Difference?

In the robust universe of network routing, understanding the mechanisms that prevent routing loops is crucial for maintaining network reliability and efficiency. Two prominent techniques used in Border Gateway Protocol...

Read Article

Subscribe for Exclusive Deals & Promotions

Stay informed about special discounts, limited-time offers, and promotional campaigns. Be the first to know when we launch new deals!