09-16-2023 08:04 AM - last edited on 09-19-2023 11:14 AM by Translator
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
Solved! Go to Solution.
09-16-2023 08:57 AM - edited 09-16-2023 10:09 AM
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,
09-16-2023 09:34 AM - last edited on 09-19-2023 11:18 AM by Translator
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.
09-16-2023 08:57 AM - edited 09-16-2023 10:09 AM
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,
09-16-2023 09:34 AM - last edited on 09-19-2023 11:18 AM by Translator
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.
09-16-2023 09:41 AM - last edited on 09-19-2023 11:21 AM by Translator
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide