cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
784
Views
2
Helpful
3
Replies

Confused about the MPLS RD and RT

Mitrixsen
Level 1
Level 1

Hello, everyone!

I've just started my MPLS L3 VPN studies and I am very confused about the RD and RT concept.

To get straight to the point, why is there the need for both of them? If, for example, the RT identifies which VRF the route should be imported/exported to and from, why is there a need for the RD?

I understand what both of them are supposed to do, I know that the RD is supposed to create

unique VPNv4 prefixes

and the RT defines which VRF we import and export these routes. This is the explanation that I see everywhere.

But why are both RT and RD needed? Why can’t we just use one that will be able to tell the router which VRF the prefix is destined for?

Why couldn’t we just say
“Hey, everything identified by

RD/RT 113:10

should be sent to

VRF-A

I’ve gone through a lot of explanations on the internet and it still confuses me a bit because I’m having trouble visualizing it. Could someone explain this to me?

David

2 Accepted Solutions

Accepted Solutions

Harold Ritter
Level 12
Level 12

Hi @Mitrixsen ,

But why are both RT and RD needed? Why can’t we just use one that will be able to tell the router which VRF the prefix is destined for?

It is to make it more flexible. The recommendation is to use a different RD on each and every PE to deal with multi path (same prefix advertises by multiple PE for load balancing purposes), where as the RT is usually the same for all PEs hosting a specific VRF.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame

Well, I often tell those new to VRFs, they are (somewhat) the L3 equivalent of L2 VLANs.  I.e. we can run totally different L3 domains side by side, on the same equipment, but for L3, they are logically separate.

For example, in L2, we can reuse the same MAC for different hosts in different VLANs.  We "know" they are different because we append (logically or physically) a VLAN ID to the MACs.

For a VRF, we append a RD to a L3 IP prefix, so we can have the

prefix 192.168.1.0/24

in two side-by-side L3 domains, each "known" to be not the "same" 

192.168.1.0/24

(i.e. each belongs to its own VRF).

I'm guessing, you might already understand all that, and RT just looks like a "redundant" RD.  Well it's not, because there's only one RD per VRF prefix, but we can have multiple RTs per VRF prefix, as they are BGP extended communities.  Like other communities, we can use different communities for policy purposes.

With RT, groups of communities are often used to share portions of VRF prefixes between different VRFs!  I.e. we can have a composite L3 domain that's composed of portions of different VRFs.

Try reading this article and see if it help explains the "why" behind RTs.

Perhaps the closest analogy to a composite L3 domain drawing from different VRFs using RTs would be the Internet which has multiple private IP networks interacting with each other, but each of those "behind" a public IP that's NATed.

Another analogy, but further from RD/RT, would be think of RD as a VLAN tag, and RT as a second VLAN tag for Q-in-Q (and why you might use Q-in-Q when you already have VLANs).  Again, this latter example is worst, because Q-in-Q tags are push/pop access, not so much a list of tags you can manipulate/examine for policy purposes (like RT BGP extended communities).

For me, it's when I learned about the forgoing, the "light bulb" went on, why there's both a RD and RT.

View solution in original post

3 Replies 3

Harold Ritter
Level 12
Level 12

Hi @Mitrixsen ,

But why are both RT and RD needed? Why can’t we just use one that will be able to tell the router which VRF the prefix is destined for?

It is to make it more flexible. The recommendation is to use a different RD on each and every PE to deal with multi path (same prefix advertises by multiple PE for load balancing purposes), where as the RT is usually the same for all PEs hosting a specific VRF.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Joseph W. Doherty
Hall of Fame
Hall of Fame

Well, I often tell those new to VRFs, they are (somewhat) the L3 equivalent of L2 VLANs.  I.e. we can run totally different L3 domains side by side, on the same equipment, but for L3, they are logically separate.

For example, in L2, we can reuse the same MAC for different hosts in different VLANs.  We "know" they are different because we append (logically or physically) a VLAN ID to the MACs.

For a VRF, we append a RD to a L3 IP prefix, so we can have the

prefix 192.168.1.0/24

in two side-by-side L3 domains, each "known" to be not the "same" 

192.168.1.0/24

(i.e. each belongs to its own VRF).

I'm guessing, you might already understand all that, and RT just looks like a "redundant" RD.  Well it's not, because there's only one RD per VRF prefix, but we can have multiple RTs per VRF prefix, as they are BGP extended communities.  Like other communities, we can use different communities for policy purposes.

With RT, groups of communities are often used to share portions of VRF prefixes between different VRFs!  I.e. we can have a composite L3 domain that's composed of portions of different VRFs.

Try reading this article and see if it help explains the "why" behind RTs.

Perhaps the closest analogy to a composite L3 domain drawing from different VRFs using RTs would be the Internet which has multiple private IP networks interacting with each other, but each of those "behind" a public IP that's NATed.

Another analogy, but further from RD/RT, would be think of RD as a VLAN tag, and RT as a second VLAN tag for Q-in-Q (and why you might use Q-in-Q when you already have VLANs).  Again, this latter example is worst, because Q-in-Q tags are push/pop access, not so much a list of tags you can manipulate/examine for policy purposes (like RT BGP extended communities).

For me, it's when I learned about the forgoing, the "light bulb" went on, why there's both a RD and RT.

M02@rt37
VIP
VIP

@Mitrixsen 

The RD is used to make

VPN-IPv4

prefixes unique within the global BGP table.

The RT is used to control the distribution and import/export of routes between the VRFs.

In essence, RD is about creating unique

VPN-IPv4

prefixes, and RT is about controlling the sharing of these prefixes among VRFs. They serve different purposes and are essential in providing the necessary isolation and control in complex MPLS L3 VPN deployments.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.
Review Cisco Networking for a $25 gift card