ROUTE-DISTINGUISHER AND ITS TYPES

Route-Distinguisher is 64bit value appended to an IPv4 route/prefix to make it unique while it is advertised from a PE to PE or PE to RR. The total 96bit prefix is called a VPNv4 route/prefix.

A VPNv4 (or VPN-IPv4) route comprises of 8-byte Route-Distinguisher (RD) and 4-byte IPv4 address. When a PE router receives an IPv4 prefix, it translates it into VPNv4 prefixes. So if the same address scheme is used in different VPNs, it is possible for BGP to carry completely different routes to that address, one for each VPN.


Important Note:  Some books/blogs explain RD is locally significant which is not true. RD value is carried in a VPNv4 update under MP Reach NLRI attribute.

RD consists of following 3 fields:
 
1) A Type field (2 bytes).
2) An Administrator field.
3) An Assigned Number field.


Please the diagram below for more details:


The value of the Type field determines the lengths and the semantics of the other two fields. The Administrator field identifies the assigned number authority and the Assigned Number field contains a number that has been assigned by the identified authority for that purpose.

At present, three values of Type field are identified- 0, 1 and 2.

TYPE0: If Type value is 0, the Administrator field is 2-bytes and Assigned Number field is 4-bytes.

The Administrator field should be set to Autonomous System Number (ASN- only public ASN should be used) assigned by the appropriate authority. The Assigned Number field contains a number from a numbering space that is administered by the enterprise to which the ASN has been assigned by the appropriate authority.

Example- If the SP is using ASN 100, and the Assigned Number is 200, the IPv4 prefix 192.168.10.0/24 is translated to 0:100:200:192.168.10.0.

TYPE1: If Type value is 1, the Administrator field is 4-bytes and Assigned Number field is 2-bytes.

The Administrator field should be set to the IP address (public IP addresses should be used). The Assigned Number field contains a number from a numbering space that is administered by the enterprise to which the IP address has been assigned by the appropriate authority.

Example- If the SP is using the IP address 9.9.0.1, and the Assigned Number is 200, the IPv4 prefix 192.168.10.0/24 is translated to 1:9.9.0.1:200:192.168.10.0

Type 0 and Type 1 RDs are used when translating IPv4 prefixes to VPNv4 prefix. Cisco IOS uses Type 0 RD only for this purpose.

TYPE2: If Type value is 2, the Administrator field is 4-bytes and Assigned Number field is 2-bytes.

The Administrator field should be set to BGP Autonomous System Number (ASN- only public ASN should be used) assigned by the appropriate authority. The Assigned Number field contains a number from a numbering space that is administered by the enterprise to which the ASN has been assigned by the appropriate authority.

Example- If the SP is using ASN 100, and the Assigned Number is 200, the IPv4 prefix 192.168.10.0/24 is translated to 2:100:200:192.168.10.0

To configure RD in Cisco IOS, use the formats ASN : Seq number  or IP-address : Seq number under  the VRF configuration.


Hope you have enjoyed reading this Post. Please share your feedback if you liked this post. You can also write to us on networkurge@gmail.com.