Route Targets and Route Distinguishers - MPLS L3 VPNs

Hello, everyone!

I would like to apologize in advance for creating a completely new post regarding this but I believe that this is a major point of confusion when it comes to MPLS L3 VPNs not only for me but for many other people as well.

This post is a question about RDs (Route Distinguishers) and RTs (Route Targets) in MPLS.

The general explanation to them that I practically see everywhere is the following:
RD - Makes the prefix unique
RT - Imports and exports routes from and into a VRF.

The question here is, why are both of them necessary? Consider the following scenario.


Why couldn’t MPLS L3 VPNs work just solely on Route Targets without any Route Distinguishers or vice-versa?

For example, what exactly would prevent PE1 from using solely just RTs → so importing the prefixes it learns from Customer A and Customer B into the appropriate VRFs using RTs and then advertise it to PE2 who could in return export it to the correct customer VRF?

The PE routers would be able to differentiate between the different prefixes because they would have a different RT value and be a part of different VRFs.

If Customer A advertises something to PE1 and PE1 assigns it an RT of 1234:1 (for example) → advertises it to PE2 who reads the packet, sees the RT value and exports it into the appropriate VRF (Customer A VRF), there wouldn’t really be a need for RD, would there?

Then again, Customer B could advertise something to PE1, PE2 could assign it a different RT (like 1234:2) → advertise it to PE2 who would then export it into the Customer B VRF.

I just can’t see why we would even need RDs in the first place. All this “uniqueness” would be obtained just by assigning the prefixes a different Route Target value so they can be exported into the correct VRF, would it not?

I appreciate everyone’s help here.

Kind regards,
David

Hello David

RTs and RDs can be challenging to comprehend, and I too had difficulty in getting my mind around the idea. The key to understanding the need for both RDs and RTs lies in understanding their different roles in MPLS VPNs.

RDs and RTs serve two different purposes in an MPLS network. RDs are used to create unique VPNv4 prefixes in the service provider’s network, while RTs are used to control the import and export of routes in a VRF.

RDs are crucial because they allow for the existence of overlapping IP addresses from different VPNs within the provider’s network. Each RD makes the same IP prefix unique by appending an 8-byte RD value to the customer’s IPv4 prefix. This results in a VPNv4 prefix that is unique across the service provider’s network, which allows the provider’s routers to store routes from different customers (even with overlapping IP addresses) in their BGP tables.

On the other hand, RTs are used to control which routes are imported and exported from a VRF. When a route is exported from a VRF, the RT value is added to the route as a BGP extended community. When the route is received on another PE router, the RT value is examined to determine which VRFs should import the route.

In your example, without RDs, if Customer A and Customer B both use the same IP prefix, the PE routers won’t be able to differentiate between them, even with different RTs. The RD is what allows the same IP prefix to exist multiple times in the service provider’s BGP table.

So, while it might seem like RTs alone could handle the job, the reality is that both RDs and RTs are necessary for the proper functioning of MPLS L3 VPNs.

Feel free to ask if you have any more questions.

I hope this has been helpful!

Laz