RD vs RT in MPLS: Route Distinguisher and Route Target

Rashmi Bhardwaj | Blog,BUZZ,Routing & Switching
Google ADs

In MPLS (Multiprotocol Label Switching), RD and RT refer to concepts used in the context of VPNs (Virtual Private Networks) and routing. In this article we will discuss the comparison RD vs RT in detail.

Route Distinguisher (RD)

A Route Distinguisher (RD) separates routes (one VRF for each customer routing table) of one customer from another. RD is prepended to each route (64-bit identifier is prepended) within a VRF to identify which VPN the route belongs to. An RD is carried along with a route via MP-BGP when exchanging VPN routes with other PE routers.

Route Target (RT)

Route Target is a 64-bit identifier used as part of MP-BGP attribute (extended community) to identify which route should be exported or imported to specific VPN. Whereas route distinguishers are used to maintain uniqueness among identical routes in different VRFs, route targets can be used to share routes among them. We can apply route targets to a VRF to control the import and export of routes.

Google ADs

In case of configuring VRF lite, while RD is mandatory to be configured, RT configuration may not be required. Additionally, Route target may be categorized into 2 types –

  • Export Route target
  • Import Route target

Comparison Table: RD vs RT

Below table summarizes the differences between RD and RT

PARAMETERRDRT
Abbreviation forRoute DistinguisherRoute Target
Definition64-bit identifier prepended to IPv4 route used to identify VPN the route belongs to64-bit identifier used as part of MP-BGP attribute (extended community) to identify which route should be exported or imported to specific VPN.
Required in VRF LiteYesNot required
Same value across  different VPNsNoMay be same across multiple VPNs especially when using shared services.
TypesNo further subtypes2 Types – •Export Route target •Import Route target
Configuration exampleip vrf <VRF name> rd 1:1ip vrf <VRF name> rd 1:1 route-target import 100:100 route-target export 100:100
Download the difference table RD vs RT in MPLS

Configuring RD and RT

Configuring Route Distinguishers (RDs) and Route Targets (RTs) in MPLS VPN involves setting up VRFs (Virtual Routing and Forwarding instances) and ensuring proper import and export of routes.

Example Configuration

Step 1: Define VRFs and Assign RDs and RTs

  • The rd command assigns a unique RD to each VRF.
  • The route-target export command sets the RT for exporting routes.
  • The route-target import command sets the RT for importing routes.
Router(config)# ip vrf Customer_A
Router(config-vrf)# rd 65000:1
Router(config-vrf)# route-target export 65000:1
Router(config-vrf)# route-target import 65000:1

Router(config)# ip vrf Customer_B
Router(config-vrf)# rd 65000:2
Router(config-vrf)# route-target export 65000:2
Router(config-vrf)# route-target import 65000:2

Step 2: Assign Interfaces to VRFs

  • Each interface is assigned to a VRF using the ip vrf forwarding command.
  • The ip address command assigns an IP address to the interface.
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip vrf forwarding Customer_A
Router(config-if)# ip address 192.168.1.1 255.255.255.0

Router(config)# interface GigabitEthernet0/1
Router(config-if)# ip vrf forwarding Customer_B
Router(config-if)# ip address 192.168.2.1 255.255.255.0

Step 3: Configure BGP for VPNv4 Address Family

  • BGP is configured to support the VPNv4 address family.
  • Neighbors are activated and configured to send extended community attributes.
  • Routes from connected interfaces are redistributed into the VRF-specific address families.
Router(config)# router bgp 65000
Router(config-router)# address-family vpnv4
Router(config-router-af)# neighbor 192.0.2.1 remote-as 65000
Router(config-router-af)# neighbor 192.0.2.1 activate
Router(config-router-af)# neighbor 192.0.2.1 send-community extended
Router(config-router-af)# exit-address-family

Router(config-router)# address-family ipv4 vrf Customer_A
Router(config-router-af)# redistribute connected
Router(config-router-af)# exit-address-family

Router(config-router)# address-family ipv4 vrf Customer_B
Router(config-router-af)# redistribute connected
Router(config-router-af)# exit-address-family

Step 4: Verify Configuration

  • Use show commands to verify VRF configurations, route tables, and BGP VPNv4 routes.
Router# show ip vrf
Router# show ip route vrf Customer_A
Router# show ip route vrf Customer_B
Router# show bgp vpnv4 unicast all

By following these steps, you can configure RDs and RTs in an MPLS VPN environment, ensuring proper route differentiation and distribution across multiple VRFs.

ABOUT THE AUTHOR


Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart