---
title: EVPN Configuration
slug: enterprise-v5p2/evpn-configuration
description: evpn configuration
createdAt: 2025-11-14T03:58:41.314Z
---

### <font color="#1d50a2">show evpn</font>

**\[Command]**
**show evpn**

**\[Purpose]**
Display the current EVPN configuration

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">show evpn access-vlan</font>

**\[Command]**
**show evpn access-vlan** \[*vlan\_id*]

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

**\[View]**
System view

**\[Use Cases]**

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

### <font color="#1d50a2">show evpn es</font>

**\[Command]**
**show evpn es &#x7B;detail}**

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

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">show evpn es-evi</font>

**\[Command]**
**show evpn es-evi** \[**vni**  *vni\_id*|**json**|**detail**]

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

**\[Parameter]**

| **Parameter** | **Description**                  |
| ------------- | -------------------------------- |
| *vni\_id*     | Specify the VNI to be displayed. |

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">show evpn arp-cache</font>

**\[Command]**
**show evpn arp-cache vni** **\{** *vni\_id*|**all**}

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

**\[Parameter]**

| **Parameter** | **Description**                  |
| ------------- | -------------------------------- |
| *vni\_id*     | Specify the VNI to be displayed. |

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">show evpn mac</font>

**\[Command]**
**show evpn mac vni** **\{** *vni\_id*|**all**}

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

**\[Parameter]**

| **Parameter** | **Description**                  |
| ------------- | -------------------------------- |
| *vni\_id*     | Specify the VNI to be displayed. |

**\[View]**
System view

**\[Use Cases]**

```plaintext
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
```

### <font color="#1d50a2">evpn mh mac-holdtime</font>

**\[Command]**
**evpn mh mac-holdtime** *time*
**no evpn mh mac-holdtime** *time*

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

**\[Parameter]**

| **Parameter** | **Description**                            |
| ------------- | ------------------------------------------ |
| *time*        | Unit: seconds, Range: 0-86400, default: 60 |

**\[View]**
Interface view、Lag view

**\[Use Cases]**

```plaintext
sonic# evpn mh mac-holdtime 60
```

### <font color="#1d50a2">evpn mh neigh-holdtime</font>

**\[Command]**
**evpn mh neigh-holdtime** *time*
**no evpn mh neigh-holdtime** *time*

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

**\[Parameter]**

| **Parameter** | **Description**                            |
| ------------- | ------------------------------------------ |
| *time*        | Unit: seconds, Range: 0-86400, default: 60 |

**\[View]**
Interface view、Lag view

**\[Use Cases]**

```plaintext
sonic# evpn mh neigh-holdtime 60
```

### <font color="#1d50a2">evpn mh es-id</font>

**\[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]**

| **Parameter** | **Description**   |
| ------------- | ----------------- |
| *es\_id*      | Range: 1-16777215 |

**\[View]**
Interface view、Lag view

**\[Use Cases]**

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

### <font color="#1d50a2">evpn mh es-sys-mac</font>

**\[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]**

| **Parameter**  | **Description**                                                          |
| -------------- | ------------------------------------------------------------------------ |
| *es\_sys\_mac* | The ES\_Sys\_Mac address for the interface must be in MAC address format |

**\[View]**
Interface view、Lag view

**\[Use Cases]**

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

### <font color="#1d50a2">evpn mh es-df-pref</font>

**\[Command]**
**evpn mh es-df-pref** *priority*
**no evpn mh es-df-pref**

**\[Purpose]**
Configure the priority of interface

**\[Parameter]**

| **Parameter** | **Description**               |
| ------------- | ----------------------------- |
| *priority*    | Range: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]**

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

### <font color="#1d50a2">mh-group-id</font>

**\[Command]**
**mh-group-id** *id*
**no mh-group-id**

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

**\[Parameter]**

| **Parameter** | **Description**  |
| ------------- | ---------------- |
| *id*          | Range: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]**

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

### <font color="#1d50a2">address-family l2vpn evpn</font>

**\[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]**

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

### <font color="#1d50a2">neighbor activate</font>

**\[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]**

| **Parameter** | **Description**                    |
| ------------- | ---------------------------------- |
| *A.B.C.D*     | IPv4 address                       |
| *X\:X\::X*:X  | IPv6 address                       |
| *String*      | Specify the name of the peer group |

**\[View]**
EVPN address family view

**\[Use Cases]**

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

### <font color="#1d50a2">advertise-all-vni</font>

**\[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]**

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

