Enhance your Career in Networking With IPinBits!!!​

MPLS: Route Distinguisher

This article will explain what is Route Distinguisher in MPLS, why do we need it what is the significance of RD.

  • Route Distinguisher is 64-bit unique identifier which keeps the customer prefixes unique in ISP domain. (interview Question)
  • RD uses the format ASN: NN, ASN is the as number, and NN is the number which we keep for customer sites.
  • RD provides uniqueness to the customer prefixes, so we can have same prefix/address space for multiple customers, its routing/uniqueness will be taken care by RD.

Let’s take the same topology to understand better.

For now, lets just concentrate on R1-PE1, as you see R-1-PE1 has two customers sites, Customer-A-Site1 and Customer-A-Site2, if you look closely in the topology, the address space used by both the customer is exactly the same, PE-CE address space is also exactly the same.

PE-CE : 10.0.0.0/24, the internal LAN : 11.11.11.0/24 is configured on both the customer Sites.

This is where RD comes into the picture, RD is configured on the R-1PE1 router,

RD for Customer site A – 1:1 (ASN :NN)

RD for Customer site B – 1:2 (ASN:NN).

So how does it make unique, the RD is attached to the ipv4 prefix when the routes / prefix enters the VRF ( A and B), PE will add this RD and make them unique in the ISP domain, so when the route is sent between the PE devices in our case its , R-1PE1 —–R-5-PE2, this is exactly where the RD makes its unique, just to let you know this is where MP-BGP protocol works, the routes in L3 VPN table is the place you will see this prefixes unique.

Whenever you hear the word VPNV4 prefix, or L3 VPN prefix or 96-bit route or a 12-byte prefix, this are all one and the same and this is only inside the MPLS Domain where we have L3 VPN running.

So, what is this 96 Bit prefix route, let’s check:

So, if you see above, this is 96-bit prefix, and normal BGP or any IGP cannot handle this 96 bit prefixes, this is way we need additional protocol here to handle such a long prefix, so MP-BGP is answer to this problem, it supports multiple protocols (V4, V6, VPNV4).

MP-BGP is king of all protocols, since its has multiple address families supported along with multiple capabilities like BGP-LU, L3 VPN, V4, V6…….. You will see this protocol as the ultimate solution everywhere.

Enough theory, lets verify this concept.

We will verify the RD on R-1-PE1, for both the customers connected. We are running EBGP as PE-CE protocol, MP-BGP as PE-PE, we will have detail articles on L3 VPN working with entire configuration and verification, this is just about RD here.

If you see both the routes(11.11.11.0/24 and 10.0.0.0/24) received are kept in VRF this is also where customer routes become unique, but this routes are needed to be exported other PE’s as well, it has be unique there as well, so this when the RD get attached, to this prefixes (becomes 96 bit route) and then its exported to BGP ( MP-BGP), as you see below the routes are unique VPNV4 Prefixes inside ISP. This is the whole point why RD is required ( Interview explanation as Well)

R-1-PE1#show ip route vrf Customer-A-Site1 

Routing Table: Customer-A-Site1
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/24 is directly connected, GigabitEthernet0/1
L        10.0.0.1/32 is directly connected, GigabitEthernet0/1
      11.0.0.0/24 is subnetted, 1 subnets
B        11.11.11.0 [20/0] via 10.0.0.2, 00:29:03
R-1-PE1#
R-1-PE1#
R-1-PE1#
R-1-PE1#show ip route vrf Customer-B-Site1

Routing Table: Customer-B-Site1
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/24 is directly connected, GigabitEthernet0/2
L        10.0.0.1/32 is directly connected, GigabitEthernet0/2
      11.0.0.0/24 is subnetted, 1 subnets
B        11.11.11.0 [20/0] via 10.0.0.2, 00:29:12
R-1-PE1#

As you see below the prefix is the same i.e. 11.11.11.0/24 and 10.0.0.0/24

R-1-PE1#show ip bgp vpnv4 all
BGP table version is 9, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:1 (default for vrf Customer-A-Site1)
 *>  10.0.0.0/24      10.0.0.2                 0             0 65000 i
 *>  11.11.11.0/24    10.0.0.2                 0             0 65000 i
Route Distinguisher: 1:2 (default for vrf Customer-B-Site1)
 *>  10.0.0.0/24      10.0.0.2                 0             0 65100 i
 *>  11.11.11.0/24    10.0.0.2                 0             0 65100 i
R-1-PE1#

This is the way RD makes customer routes unique in MPBGP or ISP domain running L3 VPN services.

The below packet capture is taken for MP-BGP on R-1PE1, where you will see the RD is send as part of NLRI in BGP’s update message:

This is all about RD and another building block to MPLS L3 VPN article, next article is on route-target.

Stay Tuned !!!!!!

Related blog posts