Route Distinguisher & its types

Route Distinguisher & its types

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 space is used in different VPNs, it is possible for BGP to carry completely different routes to that address, one for each VPN.

An RD is simply a number; it does not provide any information. It is only used to translate an IPv4 prefix into VPNv4 prefix, making same IPv4 prefix a completely different VPNv4 prefix, allowing BGP to distribute these VPNv4 prefixes.

An RD consists of three fields-

1) A Type field (2 bytes)

2) An Administrator field

3) An Assigned Number field

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.

Type 0: When 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 64222, and the Assigned Number is 100, the IPv4 prefix 172.16.1.0/30 is translated to 0:64222:100:172.16.1.0

Type 1: When 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 192.168.1.1, and the Assigned Number is 100, the IPv4 prefix 172.16.1.0/30 is translated to 1:192.168.1.1:100:172.16.1.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.

Type 2: When 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 64222, and the Assigned Number is 100, the IPv4 prefix 172.16.1.0/30 is translated to 2:64222:100:172.16.1.0

Type 2 RD is used to signal Multicast VPN.

To configure RD in Cisco IOS, use

rd ASN : number or rd IP-address : number under VRF configuration.

Further reading:

RFC 4364: BGP/MPLS IP VPNs http://www.ietf.org/rfc/rfc4364.txt