SONiC
Module 4 · EVPN/VXLAN in SONiC

Establish EVPN

60 minLabConfigurationCorrelationVirtualOpen-source

Turn on the control plane: bring up the loopback-to-loopback BGP session, activate the l2vpn evpn address family, advertise the relevant routes, and confirm the EVPN RIB and remote-VTEP information appear on both leaves. After this lab the directory exists — hosts can find each other.

Safety: Caution

May change state — take a snapshot first.

clear bgp and session config changes flap the control plane — treat as disruptive, work from 'vxlan-configured'.

Two-leaf VXLAN lab (Host1—Leaf1—underlay—Leaf2—Host2)

  Host1 (Linux)                                   Host2 (Linux)
  10.10.10.11/24                                  10.10.10.12/24
      │ eth1                                           eth1 │
      │                                                     │
  ┌───┴────────┐        virtual underlay          ┌────────┴───┐
  │  Leaf1     │  Ethernet0  ── p2p ──  Ethernet0  │  Leaf2     │
  │  SONiC-VS  │◀───────── routed IP fabric ──────▶│  SONiC-VS  │
  │  Lo0 =     │        (BGP, ECMP-capable)        │  Lo0 =     │
  │  10.0.0.1  │                                   │  10.0.0.2  │
  └────────────┘                                   └────────────┘
   access: EthernetX (VLAN 10 ↔ VNI 10010)   access: EthernetX (VLAN 10 ↔ VNI 10010)

Objective

  • Establish the overlay BGP session between loopbacks (multihop if needed).
  • Activate the l2vpn evpn address family and enable EVPN for the VNI.
  • Inspect the EVPN RIB and confirm remote VTEP information.
  • Correlate a locally learned MAC to its type-2 advertisement.

Starting state

  • VXLAN tunnel + VLAN-VNI map present, but no EVPN session and empty remote MAC/VTEP tables.

Prerequisites: Lab 4.2 complete ('vxlan-configured' snapshot). · Underlay loopbacks reachable (Lab 4.1).

Tasks

  1. 1

    Bring up the overlay (loopback) BGP session

    The EVPN session is separate from the underlay session and typically peers loopback-to-loopback.

    FRR / vtysh
    vtysh
    FRR / vtysh
    configure terminal
    FRR / vtysh
    router bgp 65001
    FRR / vtyshpeer the remote loopback
     neighbor 10.0.0.2 remote-as 65002
    FRR / vtysh
     neighbor 10.0.0.2 update-source Loopback0
    FRR / vtyshif eBGP over loopbacks
     neighbor 10.0.0.2 ebgp-multihop 3
    Expected:
    • A second BGP session (overlay) reaches Established, distinct from the underlay session.

    What happened internally: Rung 5 of the ladder. The overlay and underlay sessions fail independently — keep them mentally separate.

  2. 2

    Activate the l2vpn evpn address family

    FRR / vtysh
     address-family l2vpn evpn
    FRR / vtysh
      neighbor 10.0.0.2 activate
    FRR / vtyshadvertise locally configured VNIs
      advertise-all-vni
    FRR / vtysh
    end
    Expected:
    • EVPN AF active with the neighbor; local VNIs advertised.

    What happened internally: This is where type-3 (IMET) routes get originated so BUM replication works, and type-2 routes will follow as MACs are learned.

  3. 3

    Inspect the EVPN RIB and remote VTEP info

    FRR / vtysh
    vtysh -c 'show bgp l2vpn evpn summary'
    FRR / vtyshall route types
    vtysh -c 'show bgp l2vpn evpn'
    FRR / vtysh
    vtysh -c 'show evpn vni'
    SONiC CLI
    show vxlan remotevni
    Expected:
    • EVPN session Established; type-3 routes for the VNI present; remote VTEP (remote loopback) learned in show vxlan remotevni.

    What happened internally: Rungs 5–7. Remote VTEP now known even before any host traffic — that is the type-3/IMET machinery.

  4. 4

    Correlate a local MAC to its advertisement

    Generate one frame from Host1, then watch the MAC appear locally and as a type-2 route.

    Linuxfrom Host1 → Host2 (may need ARP first)
    ping -c1 10.10.10.12
    SONiC CLILeaf1: local learn of Host1 MAC
    show mac
    FRR / vtyshtype-2 advertisement
    vtysh -c 'show bgp l2vpn evpn route type macip'
    Expected:
    • Host1's MAC learned locally on Leaf1 and present as a type-2 route; on Leaf2 the same MAC appears as remote behind Leaf1's VTEP.

    What happened internally: This is the control-plane half of Lab 4.4's correlation: local learn → type-2 originate → remote import.

Troubleshooting branches

If: EVPN summary shows session down

Then: Overlay session uses loopbacks + update-source; underlay must already route those loopbacks. Check multihop for eBGP.

If: Session up but no type-2/type-3 routes

Then: advertise-all-vni present? VNI locally configured? This is the 'session up, route absent' split state — check RT/import next.

If: Remote VTEP not in show vxlan remotevni

Then: Confirm type-3 routes are being exchanged and VNIs match on both leaves.

Cleanup / rollback
  • Keep EVPN running — Labs 4.4–4.6 depend on it.
  • Snapshot each leaf as 'evpn-established'.

Lab evidence checklist

  • Overlay EVPN session Established (distinct from underlay).
  • type-3 routes present for the VNI; remote VTEP learned.
  • A local MAC correlated to its type-2 advertisement.
  • 'evpn-established' snapshot exists on each leaf.

Reflection

  • How did Leaf2 learn about Leaf1's VTEP before any unicast traffic flowed?
  • If the EVPN session were up but no type-2 routes appeared, which two causes would you check first?
Lab notes & observations