Ingress leaf in Anycast MH mode

The ingress leaf node (such as Leaf3 in EVPN Anycast MH) function is mainly a control-plane function and is supported on all platforms, without requiring any datapath extensions.

For creating the Ethernet Segment (ES) destination, the following four operation modes are supported.

Non-Anycast mode

The ingress leaf operates in this mode when the ESI is identified as a non-Anycast MH ES. A non-Anycast MH ES is an ES where all AD per ES routes are received with A=0.

Anycast mode with multiple AD per-ES routes

In this mode, the ingress leaf receives multiple AD per-ES routes for the same ESI, all with the 'A' flag set to 1 and a consistent Anycast VTEP.

The ES destination is created using the Anycast VTEP learned from these routes and the VNI from the first received MAC/IP Advertisement or IP Prefix route.

Anycast mode with a single AD per-ES route

This mode applies when only a single AD per-ES route is received for the ES, or when all but one of the AD per-ES routes have been withdrawn.

The ES destination is created using the next-hop from the AD per-ES route and the VNI from the first received MAC/IP Advertisement or IP Prefix route.

Mismatch mode

This mode occurs when multiple AD per-ES routes are received for the same ESI, but the 'A' flag or Anycast VTEP information is inconsistent. A single route with A=1 is enough for the ingress leaf to be in "anycast mode".

If the ingress leaf receives AD per ES routes with an inconsistent "A" flag or Anycast VTEP information, the ES destination is created using the VTEPs of the AD per-ES routes NLRI next hops (allows load balancing) and the VNI from the first received MAC/IP Advertisement or IP Prefix route.

Only resolved AD per-ES routes (those with a reachable next hop and Anycast VTEP) are considered.

If a route cannot be resolved, BGP applies treat-as-withdraw behavior.