Skip to content

EVPN Configuration

[Command]
show evpn

[Purpose]
Display the current EVPN configuration

[View]
System view

[Use Cases]

sonic# show evpn
L2 VNIs: 2
L3 VNIs: 0
Advertise gateway mac-ip: No
Advertise svi mac-ip: No
Advertise svi mac: Yes
Duplicate address detection: Disable
Detection max-moves 5, time 180
EVPN MH:
mac-holdtime: 60s, neigh-holdtime: 60s
startup-delay: 180s, start-delay-timer: --:--:--
uplink-cfg-cnt: 0, uplink-active-cnt: 0

[Command]
show evpn access-vlan [vlan_id]

[Purpose]
Display the VLAN information in the current EVPN configuration.

[View]
System view

[Use Cases]

sonic# show evpn access-vlan
VLAN SVI L2-VNI VXLAN-IF # Members
1000 Vlan1000 16777215 Vxlan16777215 2
2000 Vlan2000 2000 Vxlan2000 0

[Command]
show evpn es {detail}

[Purpose]
Display the ESI value of the multi-homing group interface 、DF role and its remote VTEP information

[View]
System view

[Use Cases]

sonic# show evpn es
Type: B bypass, L local, R remote, N non-DF
ESI Type ES-IF VTEPs
03:00:11:22:33:44:55:00:00:65 LR Ethernet1 120.1.1.122
03:00:11:22:33:44:55:00:00:66 LR Ethernet2 120.1.1.81
03:00:11:22:33:44:55:00:00:67 R - 120.1.1.81

[Command]
show evpn es-evi [vni vni_id|json|detail]

[Purpose]
Display the mapping relationships between local ESIs and VNIs.

[Parameter]

ParameterDescription
vni_idSpecify the VNI to be displayed.

[View]
System view

[Use Cases]

sonic# show evpn es-evi
Type: L local, R remote
VNI ESI Type
16777215 03:00:11:22:33:44:55:00:00:65 L
16777215 03:00:11:22:33:44:55:00:00:66 L

[Command]
show evpn arp-cache vni { vni_id|all}

[Purpose]
Display the ARP entries in EVPN, including both local and synchronized entries.

[Parameter]

ParameterDescription
vni_idSpecify the VNI to be displayed.

[View]
System view

[Use Cases]

sonic# show evpn arp-cache vni all
VNI 16777215 #ARP (IPv4 and IPv6, local and remote) 1
Flags: I=local-inactive, P=peer-active, X=peer-proxy
Neighbor Type Flags State MAC Remote ES/VTEP Seq #'s
123.1.1.11 remote active 00:00:02:00:aa:01 03:00:11:22:33:44:55:00:00:67 0/0

[Command]
show evpn mac vni { vni_id|all}

[Purpose]
Display the mac entries in EVPN, including both local and synchronized entries.

[Parameter]

ParameterDescription
vni_idSpecify the VNI to be displayed.

[View]
System view

[Use Cases]

sonic# show evpn mac vni all
VNI 16777215 #MACs (local and remote) 2
Flags: N=sync-neighs, I=local-inactive, P=peer-active, X=peer-proxy
MAC Type Flags Intf/Remote ES/VTEP VLAN Seq #'s
00:00:02:00:aa:01 remote 03:00:11:22:33:44:55:00:00:67 0/0
00:00:00:ff:ff:00 local Vlan1000 0/0

[Command]
evpn mh mac-holdtime time

no evpn mh mac-holdtime time

[Purpose]
Configure the retention time for MAC addresses synchronized via EVPN.

[Parameter]

ParameterDescription
timeUnit: seconds, Range: 0-86400, default: 60

[View]
Interface view、Lag view

[Use Cases]

sonic# evpn mh mac-holdtime 60

[Command]
evpn mh neigh-holdtime time

no evpn mh neigh-holdtime time

[Purpose]
Configure the retention time for ARP entries synchronized via EVPN.

[Parameter]

ParameterDescription
timeUnit: seconds, Range: 0-86400, default: 60

[View]
Interface view、Lag view

[Use Cases]

sonic# evpn mh neigh-holdtime 60

[Command]
evpn mh es-id es_id

no evpn mh es-id

[Purpose]
Configure the ESI value for the interface. In a multi-homing scenario, interfaces belonging to the same multi-homing group must have the same ESI value. The ESI value, which uniquely identifies an interface in a multi-homing group, is formed by combining the ES_ID and the ES_Sys_Mac.

[Parameter]

ParameterDescription
es_idRange: 1-16777215

[View]
Interface view、Lag view

[Use Cases]

sonic(config)# interface ethernet 3
sonic((config-if-3)# evpn mh es-id 101

[Command]
evpn mh es-sys-mac es_sys_mac

no evpn mh es-sys-mac

[Purpose]
Configure the ES_Sys_Mac value for the interface. In a multi-homing scenario, the ES_Sys_Mac for interfaces in the same group must be identical. The ESI value, which is used to identify an interface in a multi-homing group, is formed by combining the ES_ID and the ES_Sys_Mac.

[Parameter]

ParameterDescription
es_sys_macThe ES_Sys_Mac address for the interface must be in MAC address format

[View]
Interface view、Lag view

[Use Cases]

sonic(config)# interface ethernet 3
sonic((config-if-3)# evpn mh es-sys-mac 00:11:22:33:44:55

[Command]
evpn mh es-df-pref priority

no evpn mh es-df-pref

[Purpose]
Configure the priority of interface

[Parameter]

ParameterDescription
priorityRange:1-65535, default: 32767

[View]
Interface view、Lag view

[Usage Scenario]

In a multi-homing scenario, interfaces within the multi-homing group negotiate the Designated Forwarder (DF) role. An interface with a higher priority value has higher precedence; when priorities are equal, the VTEP with the smaller IP address has higher precedence.

[Use Cases]

sonic(config)# interface ethernet 3
sonic((config-if-3)# evpn mh es-df-pref 100

[Command]
mh-group-id id

no mh-group-id

[Purpose]
Configure the interface on the Leaf device to an MH Group

[Parameter]

ParameterDescription
idRange:1-16777215

[View]
Interface view、Lag view

[Usage Scenario]

For dual-homed terminals connected to different Leaf devices, configure the same mh-group ID on the respective interfaces to guarantee successful terminal onboarding and seamless migration.

[Notes]

Executing this command effectively sets the ES_ID and ES_Sys_Mac. The key distinction is that the mh-group approach applies a uniform ES_Sys_Mac to all Leaf interfaces, while manually configuring ES_Sys_Mac allows for per-interface assignment.

[Use Cases]

sonic(config)# interface ethernet 3
sonic((config-if-3)# mh-group-id 1

[Command]
address-family l2vpn evpn

[Purpose]
Enter the EVPN address family view

[View]
BGP view

[Usage Scenario]

When using BGP to dynamically establish VXLAN tunnels, this command must be executed in the BGP view to enter the EVPN address family configuration view and establish BGP EVPN peers.

[Use Cases]

sonic(config)# router bgp 65100
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)#

[Command]
neighbor {A.B.C.D|X:X::X:X|String} activate

no neighbor {A.B.C.D|X:X::X:X|String} activate

[Purpose]
Enable the configuration of a BGP EVPN peer

[Parameter]

ParameterDescription
A.B.C.DIPv4 address
X:X::X:XIPv6 address
StringSpecify the name of the peer group

[View]
EVPN address family view

[Use Cases]

sonic(config)# router bgp 65100
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# neighbor 1.1.1.1 activate

[Command]
advertise-all-vni

no advertise-all-vni

[Purpose]
Configure the advertisement of all local VNIs to peers

[View]
EVPN address family view

[Use Cases]

sonic(config)# router bgp 65100
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# advertise-all-vni