Configuring an EVPN Instance

After a Layer 2 Ethernet Virtual Private Network (EVPN) instance is created, the device enters EVPN EVI configuration mode, allowing a variety of EVPN options can be configured in EVPN EVI configuration mode.

The following task configures a variety of EVPN options for an EVPN instance:

  • A Layer 2 VNI with an ID of 1000 is created.
  • VXLAN is configured as the encapsulation type for the EVPN instance.
  • The auto-generation of a route distinguisher (RD) is enabled.
  • The auto-generation of import and export route-target community attributes is enabled.
  • BGP is configured as the mechanism for host reachability advertisement.
  • Duplicate detection for MAC addresses is enabled.
  • ARP suppression is enabled.
  • Unknown unicast traffic is suppressed.
  1. Enter global configuration mode.
    device# configure terminal
  2. Enter EVPN configuration mode.
    device(config)# l2vpn evpn
  3. Create an EVPN instance.
    device(config-evpn)# evpn-instance 1 vlan-based
    device(config-evpn-evi)#
    An EVPN instance with ID 1 is created and a VLAN-based VXLAN service model is configured.
  4. Configure a Layer 2 (L2) Virtual Network Identifier (VNI).
    device(config-evpn-evi)# vni 1000 l2
    A Layer 2 VNI with an ID of 1000 is created.
  5. Configure VXLAN as the encapsulation type for the VNI.
    device(config-evpn-evi)# encapsulation vxlan
  6. Enable the auto-generation of a route distinguisher (RD) for the VNI.
    device(config-evpn-evi)# rd auto
  7. Enable the auto-generation of export route-target community attributes for the VNI.
    device(config-evpn-evi)# route-target export auto
  8. Enable the auto-generation of import route-target community attributes for the VNI.
    device(config-evpn-evi)# route-target import auto
  9. Configure BGP as the mechanism for host reachability advertisement for the VNI.
    device(config-evpn-evi)# host-reachability protocol bgp
  10. Enable duplicate detection for MAC addresses. Specify the maximum number of MAC moves allowed before timer expiry and set the MAC duplicate detection timeout interval.
    device(config-evpn-evi)# mac duplication limit 150 expiry time 1200
    The maximum number of MAC moves allowed before timer expiry is 150 and the MAC duplicate detection timeout interval is 1200 seconds.
  11. Enable ARP suppression for the VNI.
    device(config-evpn-evi)# arp-suppression
  12. Suppress unknown unicast traffic for the Layer 2 EVPN.
    device(config-evpn-evi)# unknown-unicast-suppress

The following example configures a variety of EVPN options for an EVPN instance. A Layer 2 VNI with an ID of 1000 is created. VXLAN is configured as the encapsulation type for the EVPN instance. The auto-generation of a route distinguisher (RD) is enabled. The auto-generation of import and export route-target community attributes is enabled. BGP is configured as the mechanism for host reachability advertisement. Duplicate detection for MAC addresses is enabled. ARP suppression is enabled. Unknown unicast traffic is suppressed.

device# configure terminal
device(config)# l2vpn evpn
device(config-evpn)# evpn-instance 1 vlan-based
device(config-evpn-evi)# vni 1000 L2
device(config-evpn-evi)# encapsulation vxlan
device(config-evpn-evi)# rd auto
device(config-evpn-evi)# route-target export auto
device(config-evpn-evi)# route-target import auto
device(config-evpn-evi)# host-reachability protocol bgp
device(config-evpn-evi)# arp-suppression
device(config-evpn-evi)# unknown-unicast-suppress