EVPN Type 5 (IP Prefix Route) Explained

EVPN Type 5 route that is proposed in ‘IP Prefix Advertisement in EVPN’ draft is a mechanism to carry IPv4 and IPv6 advertisements in EVPN-only networks. While EVPN Type 2 routes allow to carry both MAC addresses and IP addresses, tight coupling of specific IP addresses with IP Prefixes might not be desirable. Section 2.2 of the draft discusses different scenarios where such coupling is nor desirable.

Format of Type 5 route is shown below:

EVPN Type 5 Route Format
EVPN Type 5 Route Format

As per Draft’s definitions:

  • RD, Ethernet Tag ID and MPLS Label fields will be used as defined in RFC7432.
  • The Ethernet Segment Identifier will be a non-zero 10-byte identifier if the ESI is used as an overlay index. It will be zero otherwise.
  • The IP Prefix Length can be set to a value between 0 and 32 (bits) for ipv4 and between 0 and 128 for ipv6.
  • The IP Prefix will be a 32 or 128-bit field (ipv4 or ipv6).
  • The GW IP (Gateway IP Address) will be a 32 or 128-bit field (ipv4 or ipv6), and will encode an overlay IP index for the IP Prefixes. The GW IP field SHOULD be zero if it is not used as an overlay index.
  • The MPLS Label field is encoded as 3 octets, where the high- order 20 bits contain the label value. The value SHOULD be null when the IP Prefix route is used for a recursive lookup resolution.

Prefix Advertisement draft introduces the concept of ‘Overlay Index.’ When an overlay index is present in the Route Type 5 advertisement, the receiving Network Virtualization Edge (PE) will need to perform a recursive route resolution to find out to which egress NVE (PE) to forward the packets. The route will contain a single overlay index at most, i.e. if the ESI field is different from zero, the GW IP field will be zero, and vice versa.

The route will contain a single overlay index at most, i.e. if the ESI field is different from zero, the GW IP field will be zero, and vice versa.

Let’s review Type 5 advertisements originated by PE5 in the following example:

EVPN Type 5 Diagram
EVPN Type 5 Diagram

Overlay Gateway IP Advertisement (MPLS label set to zero)

       Path Attribute - EXTENDED_COMMUNITIES
            Flags: 0xc0, Optional, Transitive: Optional, Transitive, Complete
                1... .... = Optional: Optional
                .1.. .... = Transitive: Transitive
                ..0. .... = Partial: Complete
                ...0 .... = Length: Regular length
            Type Code: EXTENDED_COMMUNITIES (16)
            Length: 8
            Carried extended communities: (1 community)
                Community Transitive Two-Octet AS Route Target: 100:100
                    Community type high: Transitive Two-Octet AS (0x00)
                    Subtype as2: Route Target (0x02)
                    Two octets AS specific: 100
                    Four octets AN specific: 100
        Path Attribute - MP_REACH_NLRI
            Flags: 0x90, Optional, Length: Optional, Non-transitive, Complete, Extended Length
                1... .... = Optional: Optional
                .0.. .... = Transitive: Non-transitive
                ..0. .... = Partial: Complete
                ...1 .... = Length: Extended length
            Type Code: MP_REACH_NLRI (14)
            Length: 45
            Address family identifier (AFI): Layer-2 VPN (25)
            Subsequent address family identifier (SAFI): EVPN (70)
            Next hop network address (4 bytes)
            Number of Subnetwork points of attachment (SNPA): 0
            Network layer reachability information (36 bytes)
                EVPN NLRI: IP Prefix route
                    AFI: IP Prefix route (5)
                    Length: 34
                    Route Distinguisher:  (120.0.2.5:101)
                    ESI: 00 00 00 00 00 00 00 00 00
                        ESI Type: ESI 9 bytes value (0)
                        ESI 9 bytes value: 00 00 00 00 00 00 00 00 00
                    Ethernet Tag ID: 0
                    IP prefix length: 24
                    IPv4 address: 5.0.0.0
                    IPv4 Gateway address: 1.1.1.100
                    MPLS Label Stack:  
                        MPLS Label: 0 

Receiving PE will need to do a recursive lookup to determine reachability to 1.1.1.100 Gateway Address.

MPLS Label Advertisement (Gateway IP Address set to zero)

Border Gateway Protocol - UPDATE Message

            Type Code: MP_REACH_NLRI (14)
            Length: 81
            Address family identifier (AFI): Layer-2 VPN (25)
            Subsequent address family identifier (SAFI): EVPN (70)
            Next hop network address (4 bytes)
            Number of Subnetwork points of attachment (SNPA): 0
            Network layer reachability information (72 bytes)
                EVPN NLRI: IP Prefix route
                    AFI: IP Prefix route (5)
                    Length: 34
                    Route Distinguisher:  (120.0.2.5:101)
                    ESI: 00 00 00 00 00 00 00 00 00
                        ESI Type: ESI 9 bytes value (0)
                        ESI 9 bytes value: 00 00 00 00 00 00 00 00 00
                    Ethernet Tag ID: 0
                    IP prefix length: 24
                    IPv4 address: 1.1.1.0
                    IPv4 Gateway address: 0.0.0.0
                    MPLS Label Stack: 16
                EVPN NLRI: IP Prefix route
                    AFI: IP Prefix route (5)
                    Length: 34
                    Route Distinguisher: (120.0.2.5:101)
                    ESI: 00 00 00 00 00 00 00 00 00
                        ESI Type: ESI 9 bytes value (0)
                        ESI 9 bytes value: 00 00 00 00 00 00 00 00 00
                    Ethernet Tag ID: 0
                    IP prefix length: 24
                    IPv4 address: 5.0.0.0
                    IPv4 Gateway address: 0.0.0.0
                    MPLS Label Stack: 
                        MPLS Label: 16

 

Leave a Reply

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