Huawei DCN Design Guide
BGP EVPN Route Types
Traditional BGP-4 uses Update packets to exchange routing information between peers. An Update packet can advertise a type of accessible routes with the same path attributes, which are placed in Network Layer Reachability Information (NLRI) fields.
BGP-4 can manage only IPv4 unicast routing information, so Multiprotocol Extensions for BGP (MP-BGP) was developed to support multiple network layer protocols, such as IPv6 and multicast. MP-BGP extends NLRI fields on the basis of BGP-4. After extension, the description of the address family is added to the NLRI field to differentiate network layer protocols, such as the IPv6 unicast address family and VPN instance address family.
Similarly, EVPN defines a new sub-address family, that is, the EVPN address family in the L2VPN address family, and also introduces EVPN NLRI. EVPN NLRI defines the following types of BGP EVPN routes. After the routes have been advertised between EVPN peers, VXLAN tunnels can be automatically established and host addresses can be learned. The route types are as follows:
- Type 2 route — MAC/IP route: This is used to advertise the MAC address, ARP entry, and routing information of hosts.
- Type 3 route — inclusive multicast route: This is used for automatic discovery of VTEPs and dynamic establishment of VXLAN tunnels.
- Type 5 route — IP prefix route: This is used to advertise imported external routes or advertise routing information of hosts.
Advertised EVPN routes contain Route Distinguisher (RD) and VPN target (also known as route target) information. RD is used to differentiate different VXLAN EVPN routes. A VPN target is a BGP extended community attribute used to control the advertisement and receiving of EVPN routes. That is, a VPN target defines the peers that can receive EVPN routes from the local end as well as whether the local end can receive EVPN routes from peers.
There are two types of VPN targets:
- Export target: The VPN target attribute is set to export target when the local end sends EVPN routes.
- Import target: When receiving an EVPN route from a peer, the local end compares the export target in the received packet with the import target of its own. If they are the same, the local end accepts the route. Otherwise, the local end discards the route.