12-17-2024 10:19 AM
Hi,
I'm studying for ENARSI and working on MPLS currently. I'm trying to understand how the whole rd, route-target import and export works. So lets say we have a topology with 3 * PE routers connecting to different sites ( i.e red and blue),then are below correct?
1-we have a unique rd for each VRF on all PE routers that connects to remote sites. i.e red: 1:1 blue:2:2 on the relevant PE routers.
2- if route-target import for blue vrf is 1:2, then the rt export on all PE routers has to be 1:2. or can rt be unique for each remote site? so basically we would have same config for blue vrf on all PEs, unless I need route-leaking:
ip vrf blue rd 1:1 route-target export 1:2 route-target import 1:2
Thanks
12-17-2024 10:34 AM
You can use same rt export/import in all PE for one vrf.
MHM
12-17-2024 08:40 PM
12-18-2024 03:26 AM
For lab it ok to use same RT' usually I use RT both.
For real network RT is different depending on topolgy you have.
Just want to make you notice that.
MHM
12-17-2024 02:07 PM - edited 12-17-2024 02:11 PM
Hi D@1984 ,
You are correct about the RT.
For the RD, it is strongly recommended to use a different RD per VRF per PE.
For example PE1 (with lo0 ip address 192.168.100.1) would have the RD set to 192.168.100.1:1 for VRF 1, 192.168.100.1:2 for VRF 2, etc.
PE2 (with lo0 ip address 192.168.100.2) would have the RD set to 192.168.100.2:1 for VRF1, 192.168.100.2:2 for VRF2, etc.
Regards,
12-17-2024 03:14 PM
thanks for the reply, what's the reason for different rd recommendation for the same VRF at different PEs? Also I'm confused now
Thanks
12-17-2024 04:28 PM - edited 12-17-2024 05:07 PM
Hi D@1984 ,
There are two main reasons for the unique RD per VRF per PE.
1. It makes it easy to identify the originating PE by looking at the RD.
2. It provides load balancing in case two or more PEs advertises the same prefix. Bear in mind that a VPNv4/VPNv6 prefixes is made of the RD + ipv4/ipv6 prefix. If you use the same RD on all the PEs (for the same VRF), two PEs connected to the same dual connected CE and therefore advertising the same prefixes would advertise exactly the same prefixes to the route reflector. The route reflector would receive both prefixes, select the best path and advertise it to the other PEs in the network. This would prevent the other PEs from load balancing between the two advertising PEs, as they only receive the best path as selected by the RR(s).
> If I'm right, the whole point of rd is so PEs now which vrf the route belongs to.
The role of the RD is to make prefixes unique (at least between VRFs). It is the role of the RT to determine which VRF(s) the route belong to (via the import process).
Regards,
12-18-2024 02:51 AM
thanks, it makes sense now.
12-18-2024 03:20 AM
Hello D@1984
Great question! MPLS Layer 3 VPNs (L3VPNs) can be a bit tricky to understand at first, but once you break it down, the concepts of Route Distinguisher (RD) and Route Target (RT) become much clearer. Let’s address your points and clarify how RD and RT work in your scenario.
You are correct that RDs must be unique per VRF on each PE router. The RD is used to make routes globally unique in the MPLS backbone. It is not used for route filtering or control; its sole purpose is to distinguish overlapping IP address spaces (e.g., if two customers use the same subnet, like 192.168.1.0/24).
For example:
The RD does not need to match across PE routers. It only needs to be unique per VRF on each PE router. The RD is prepended to the IPv4 route to create a VPNv4 route (e.g., 1:1:192.168.1.0/24), which ensures uniqueness in the MPLS core.
The RT is used for route filtering and control. It determines which routes are imported into or exported from a VRF. RTs are carried as BGP extended community attributes and are used to control the distribution of routes between VRFs.
Yes, RTs can be unique for each remote site, but they don’t have to be. It depends on your design requirements.
In this case, the blue VRFs on PE1 and PE2 would not share routes unless you explicitly configure additional RTs for route leaking.
Let’s analyze your configuration:
This configuration means:
If you use the same configuration on all PE routers, all blue VRFs will share routes because they are all exporting and importing RT 1:2.
Route leaking is required when you want to share routes between VRFs (e.g., between red and blue VRFs). To achieve this, you would configure additional RTs. For example:
In this case, the red and blue VRFs will share routes because they are importing each other’s RTs.
Let me know if you have more questions or need further clarification!
Hope This Helps!!!
AshSe
Forum Tips:
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