Configuring an EVPN Layer 3 VNI

Follow these steps to configure an EVPN Layer 3 VNI.

About this task

Layer 3 VNI is used to support VRFs.

Procedure

  1. Configure the TCAM profile to support L3GW. Complete the steps in Configure the TCAM Profile for Layer 3 Gateway.
  2. Create VLANs to be extended on the tunnel.
    vlan 1-4
    
  3. Configure an EVPN instance.
    evpn r1
     route-target both auto
     rd auto
     vlan add 2-4
    
  4. Configure BGP.
    router bgp
      local-as 100
        neighbor 98.0.0.1 remote-as 100
      address-family ipv4 unicast
      !
      address-family ipv6 unicast
      !
      address-family l2vpn evpn
        graceful-restart
        neighbor 98.0.0.1 encapsulation vxlan
        neighbor 98.0.0.1 activate
  5. Configure a loopback interface.
    interface Loopback 1
     no shutdown
     ip ospf area 0
     ip address 1.2.3.4/32
    
  6. Configure a tunnel interface.
    interface Ethernet 0/4
     ip ospf area 0
     ip proxy-arp
     ip address 98.0.0.2/24
     no shutdown
    
  7. Configure the overlay gateway.
    overlay-gateway g1
    type layer2-extension
    ip interface Loopback 1
      map vni auto
    activate
    
  8. Configure a VRF.
    vrf red
    rd 5:50
    evpn irb ve 100 <peer-gateway> <--Identifies the L3-VNI
    address-family ipv4 unicast
      route-target export 5:100 evpn
      route-target import 5:100 evpn
    !
    address-family ipv6 unicast
      route-target export 5:100 evpn
      route-target import 5:100 evpn
    
  9. Configure the L3-VNI Integrated Routing and Bridging (IRB) instance. (An IP address is not required.)
    vlan 100  <-- The L3-VNI is a VLAN as a result of auto map mode
    router-interface Ve 100
  10. Alternatively, configure the L3-VNI IRB by using a BD. (The L3-VNI is 4K+BD-ID as a result of auto mapping.)
    bridge-domain 500 p2mp
     router-interface ve 100
    !
    interface Ve 100
    vrf forwarding red
    no shutdown
    

What to do next