Skip to content

Virtualization Configuration

Table 1 VXLAN View

CommandPurpose
show vxlan mapDisplay VXLAN mapping.
show vxlan tunnelDisplay VXLAN tunnels.
show vxlan statistics vxlan_interface_name peer peer-ip vni vni-idDisplay VXLAN statistic.
clear vxlan static vxlan_interface_name peer peer-ip vni vni-idClear VXLAN statistic.
show vxlan remotemac {all|A.B.C.D}Display VXLAN remote MAC entries.

[Command]

show vxlan map

[Purpose]

Display VXLAN mapping.

[View]

Privileged User View

[Use Cases]

sonic# show vxlan map
+-------+--------+-------+
| vni | vlan | vrf |
+=======+========+=======+
| 100 | 10 | |
+-------+--------+-------+
| 200 | 20 | |
+-------+--------+-------+
| 1000 | | 123 |
+-------+--------+-------+

[Command]

show vxlan tunnel

[Purpose]

Display VXLAN tunnels.

[View]

Privileged User View

[Use Cases]

sonic# show vxlan tunnel

show vxlan statistics vxlan_interface_name peer peer-ip vni vni-id

Section titled “show vxlan statistics vxlan_interface_name peer peer-ip vni vni-id”

[Command]

show vxlan statistics vxlan_interface_name peer peer-ip vni vni-id

[Purpose]

Display VXLAN statistic.

[Parameters]

ParameterDescription
vxlan_interface_nameVXLAN interface name.
peer-ipRemote VTEP IP.
vni-idVXLAN Network Identifier, VNI.

[View]

Privileged User View

[Notes]

CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2 is not supported yet.

[Use Cases]

sonic# show vxlan statistics 0 peer 10.1.0.207 vni 100

clear vxlan static vxlan_interface_name peer peer-ip vni vni-id

Section titled “clear vxlan static vxlan_interface_name peer peer-ip vni vni-id”

[Command]

clear vxlan statistics vxlan_interface_name peer peer-ip vni vni-id

[Purpose]

Clear VXLAN statistic.

[Parameters]

ParameterDescription
vxlan_interface_nameVXLAN interface name.
peer-ipRemote VTEP IP.
vni-idVXLAN Network Identifier, VNI.

[View]

Privileged User View

[Notes]

CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2 is not supported yet.

[Use Cases]

sonic# clear vxlan statistics 0 peer 10.1.0.207 vni 100

[Command]

show vxlan remotemac {all|A.B.C.D}

[Purpose]

Display VXLAN remote MAC entries.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address

[View]

Privileged User View

[Use Cases]

sonic# show vxlan remotemac all
+--------+-------------------+--------------+-------+---------+
| VLAN | MAC | RemoteVTEP | VNI | Type |
+========+===================+==============+=======+=========+
| Vlan17 | 60:eb:5a:00:d4:22 | 10.1.0.236 | 17 | dynamic |
+--------+-------------------+--------------+-------+---------+
| Vlan18 | 60:eb:5a:00:d4:22 | 10.1.0.236 | 18 | dynamic |
+--------+-------------------+--------------+-------+---------+
Total count : 2
sonic# show vxlan remotemac 10.1.0.236
+--------+-------------------+--------------+-------+---------+
| VLAN | MAC | RemoteVTEP | VNI | Type |
+========+===================+==============+=======+=========+
| Vlan17 | 60:eb:5a:00:d4:22 | 10.1.0.236 | 17 | dynamic |
+--------+-------------------+--------------+-------+---------+
| Vlan18 | 60:eb:5a:00:d4:22 | 10.1.0.236 | 18 | dynamic |
+--------+-------------------+--------------+-------+---------+
Total count : 2

Table 2 VXLAN Config

CommandPurpose
interface vxlan vxlan_interface_nameConfigure VXLAN interface.
mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id vxlanvni vni-id peer peer-ipConfigure static MAC entry for VXLAN.
source ip-addressSet local VTEP IP of VXLAN.
vni vni-id [vxlan vxlan_interface_name]Add VXLAN mapping.
ip route A.B.C.D/M A.B.C.D vxlan-vni vni-idConfigure static routes for VXLAN.
address-family l2vpn evpnEnter L2VPN EVPN Address-family View
neighbor A.B.C.D activateEnable EVPN of BGP neighbors.
advertise-all-vniEnable advertisement of all VNIs.
advertise ipv4 unicastEnable type-5 route advertisement.
table-map map_nameAdd a route leak policy.
import vrf vrf_nameSpecify the VRF of route leak.
vxlan statistics peer peer-ip vni vni-id enableConfigure EVPN Layer 3 tunnel traffic statistics.
vxlan mode centralizedEnable VXLAN centralized gateway.
vxlan udp-port port-numberSpecify the UDP destination port number used for VXLAN encapsulation.
rd rd-numConfigure the RD for Layer 2 VNI.
route-target {both|import|export} rt-numConfigure the RT for Layer 2 VNI.
rd rd-numConfigure the RD for Layer 3 VNI.
route-target {both|import|export} rt-numConfigure the RT for Layer 3 VNI.

[Command]

interface vxlan vxlan_interface_name

[Purpose]

Configure VXLAN interface.

[Parameters]

ParameterDescription
vxlan_interface_nameVXLAN interface name, The value range is 0-9 on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2, and 0 on other models.

[View]

Global Configuration View

[Notes]

Run command no interface vxlan vxlan_interface_name to delete VXLAN interface.

[Use Cases]

sonic# configure terminal
sonic(config)# interface vxlan 0

mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id vxlan vni vni-id peer peer-ip

Section titled “mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id vxlan vni vni-id peer peer-ip”

[Command]

mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id vxlan vni vni-id peer peer-ip

[Purpose]

Configure static MAC entry for VXLAN.

[Parameters]

ParameterDescription
HH:HH:HH:HH:HH:HHMAC address.
vlan-idVLAN ID, the range is [1,4094].
vni-idVXLAN Network Identifier, VNI.
peer-ipRemote VTEP IP.

[View]

Global Configuration View

[Notes]

Run command no mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id to delete VXLAN static MAC entry.

[Use Cases]

sonic# configure terminal
sonic(config)# mac-address static 18:17:25:37:65:0a vlan 100 vxlan vni 10 peer 20.0.0.2

[Command]

source ip-address

[Purpose]

Set local VTEP IP of VXLAN.

[Parameters]

ParameterDescription
ip-addressLocal VTEP IP address.

[View]

VXLAN Interface Configuration View

[Notes]

Run command no source to delete VXLAN local_vtep_ip

[Use Cases]

sonic# configure terminal
sonic(config)# interface vxlan 0
sonic(config-vxlanif-0)# source 10.0.0.1

[Command]

vni vni-id [vxlan vxlan_interface_name]

[Purpose]

Add VXLAN mapping.

[Parameters]

ParameterDescription
vni-idVXLAN Network Identifier, VNI.
vxlan_interface_nameVXLAN interface name. The value range is 0-9 on CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2, and 0 on other models. Default value is 0 when not specified.

[View]

Global Configuration View / VLAN Configuration View / VRF Configuration View

[Notes]

Run command no vni vni-id to delete VXLAN mapping.

[Use Cases]

sonic# configure terminal
sonic(config)# vni 1
sonic(config)# vlan 100
sonic(config-vlan-100)# vni 2
sonic(config)# vrf 123
sonic(config-vrf)# vni 1000

ip route A.B.C.D/M A.B.C.D vxlan-vni vni-id

Section titled “ip route A.B.C.D/M A.B.C.D vxlan-vni vni-id”

[Command]

ip route A.B.C.D/M A.B.C.D vxlan-vni vni-id

[Purpose]

Configure static routes for VXLAN.

[Parameters]

ParameterDescription
A.B.C.D/MSpecify the destination network segment for routing.
A.B.C.DSpecify the IP address of next hop of the route.
vni-idVXLAN Network Identifier, VNI.

[View]

VRF Configuration View

[Notes]

Run command no ip route A.B.C.D/M A.B.C.D vxlan-vni vni-id to delete static routes for VXLAN.

[Use Cases]

sonic# configure terminal
sonic(config)# ip route 20.0.0.0/24 10.0.0.57 vxlan-vni 200

[Command]

address-family l2vpn evpn

[Purpose]

Enter L2VPN EVPN Address-family View

[View]

BGP Configuration View

[Use Cases]

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

[Command]

neighbor A.B.C.D activate

[Purpose]

Enable EVPN of BGP neighbors.

[Parameters]

ParameterDescription
A.B.C.DBGP neighbor IPv4 address

[View]

BGP EVPN Address-family View

[Notes]

Run command no neighbor A.B.C.D activate to disable EVPN of BGP neighbors.

[Use Cases]

sonic# config
sonic(config)# router bgp 65227
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# neighbor 68.0.0.1 activate

[Command]

advertise-all-vni

[Purpose]

Enable advertisement of all VNIs.

[View]

BGP EVPN Address-family View

[Notes]

Run command no advertise-all-vni to disable advertisement of all VNIs.

[Use Cases]

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

[Command]

advertise ipv4 unicast

[Purpose]

Enable type-5 route advertisement.

[View]

BGP EVPN Address-family View

[Use Cases]

sonic# config
sonic(config)# router bgp 65227
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# advertise ipv4 unicast

[Command]

table-map map_name

[Purpose]

Add a route leak policy.

[Parameters]

ParameterDescription
map_nameRoute Map name.

[View]

BGP IPv4 unicast Address-family View

[Notes]

Run command no table-map map_name to delete the route leak policy.

[Use Cases]

sonic# config
sonic(config)# router bgp 65227
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# table-map RM_ROUTE_LEAK_2000

[Command]

import vrf vrf_name

[Purpose]

Specify the VRF of route leak.

[Parameters]

ParameterDescription
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

BGP IPv4 unicast Address-family View

[Notes]

Run command no import vrf vrf_name to delete the VRF of route leak.

[Use Cases]

sonic# config
sonic(config)# router bgp 65227
sonic(config-router)# address-family ipv4 unicast
sonic(config-router-af)# import vrf 200

vxlan statistics peer peer-ip vni vni-id enable

Section titled “vxlan statistics peer peer-ip vni vni-id enable”

[Command]

vxlan statistics peer peer-ip vni vni-id enable

[Purpose]

Configure EVPN Layer 3 tunnel traffic statistics.

[Parameters]

ParameterDescription
peer-ipRemote VTEP IP.
vni-idVXLAN Network Identifier, VNI.

[View]

VXLAN Interface Configuration View

[Notes]

CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2 is not supported yet. Run command no vxlan statistics peer peer-ip vni vni-id enable to delete EVPN tunnel traffic statistics configuration.

[Use Cases]

sonic# config
sonic(config)# interface vxlan 0
sonic(config-vxlanif-0)# vxlan statistics peer 10.1.0.226 vni 1000 enable

[Command]

vxlan mode centralized

[Purpose]

Enable VXLAN centralized gateway.

[View]

Global Configuration View

[Notes]

Run command no vxlan mode centralized to disable VXLAN centralized gateway.

[Use Cases]

sonic# config
sonic(config)# vxlan mode centralized

[Command]

vxlan udp-port port-number

[Purpose]

Specify the UDP destination port number used for VXLAN encapsulation.

[Parameters]

ParameterDescription
port-numberRange from 1 to 65535, and the default value is 4789.

[View]

Global Configuration View

[Notes]

This configuration requires that it be saved and then reload the device to take effect. Run command no vxlan udp-port command to restore the UDP destination port number used for VXLAN to the default value..

[Use Cases]

sonic# config
sonic(config)# vxlan udp-port 7788

[Command]

rd rd-num

[Purpose]

Configure the RD for Layer 2 VNI.

[Parameters]

ParameterDescription
rd-numThe format is A.B.C.D:MN| ASN:XX.

[View]

Layer 2 VNI view under BGP EVPN address-family.

[Notes]

RD storage takes up 6 bytes in three formats: 2-byte ASN with 4-byte custom integer value; 4-byte IP with 2-byte custom integer value; and 4-byte ASN with 2-byte custom integer value. Run command no rd [rd-num] command to delete the RD configuration.

[Use Cases]

sonic# config
sonic(config)# router bgp 65100
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# vni 26
sonic(config-router-af-vni)# rd 11:22

[Command]

route-target {both|import|export} rt-num

[Purpose]

Configure the RT for Layer 2 VNI.

[Parameters]

ParameterDescription
both|import|exportDecide the direction in which RT takes effect.
rt-numThe format is A.B.C.D:MN|EF:OPQR|GHJK:MN.

[View]

Layer 2 VNI view under BGP EVPN address-family.

[Notes]

Run command no route-target {both [rt-num]| import rt-num | export rt-num } command to delete the RT configuration.

[Use Cases]

sonic# config
sonic(config)# router bgp 65100
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# vni 26
sonic(config-router-af-vni)# route-target both 12.3.4.5:66

[Command]

rd rd-num

[Purpose]

Configure the RD for Layer 3 VNI.

[Parameters]

ParameterDescription
rd-numThe format is A.B.C.D:MN

[View]

BGP EVPN address-family view under the corresponding VRF of the Layer 3 VNI

[Notes]

RD storage takes up 6 bytes in three formats: 2-byte ASN with 4-byte custom integer value; 4-byte IP with 2-byte custom integer value; and 4-byte ASN with 2-byte custom integer value. Run command no rd rd-num command to delete the RD configuration.

[Use Cases]

sonic# config
sonic(config)# router bgp 65100 vrf 132
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# rd 55:120

[Command]

route-target {both|import|export} rt-num

[Purpose]

Configure the RT for Layer 3 VNI.

[Parameters]

ParameterDescription
both|import|exportDecide the direction in which RT takes effect.
rt-numThe format is A.B.C.D:MN|EF:OPQR|GHJK:MN.

[View]

BGP EVPN address-family view under the corresponding VRF of the Layer 3 VNI.

[Notes]

Run command no route-target {both| import| export} rt-num command to delete the RT configuration.

[Use Cases]

sonic# config
sonic(config)# router bgp 65100 vrf 132
sonic(config-router)# address-family l2vpn evpn
sonic(config-router-af)# route-target both 65207:66

Table 3 EVPN Multihoming View

CommandPurpose
show evpn es {detail|json|ESI}Display the ES detailed status information.

[Command]

show evpn es {detail|json|ESI}

[Purpose]

Display the ES detailed status information.

[Parameters]

ParameterDescription
ESISpecify the ESI.

[View]

Privileged User View

[Use Cases]

sonic# show evpn es detail
ESI: 03:00:00:01:00:00:01:00:00:64
Type: Local,Remote
Interface: link-aggregation 5
State: up
Bridge port: yes
Ready for BGP: yes
VNI Count: 0
MAC Count: 2
DF status: df
DF preference: 32767
Nexthop group: 536870913
VTEPs:
10.1.0.238 df_alg: preference df_pref: 32767 nh: 268435459

Table 4 EVPN Multihoming Config

CommandPurpose
evpn mh disable-advertise-svi-macDisable SVI MAC advertise to BGP.
evpn mh mac-holdtime holdtimeSet MAC table entry hold time.
evpn mh neigh-holdtime holdtimeSet neighbor table entry hold time.
evpn mh redirect-offEnable fast failover on control plane.
evpn mh es-id {ESI|es-id}Configure ESI.
evpn mh es-sys-mac HH:HH:HH:HH:HH:HHSet the ES system MAC.
evpn mh es-df-pref preferenceSet the preference for DF election.
evpn unique-ip vlan vlan-idEnable EVPN Unique IP feature.

[Command]

evpn mh disable-advertise-svi-mac

[Purpose]

Disable SVI MAC advertise to BGP.

[View]

Global Configuration View

[Notes]

BGP advertisement for SVI MAC is enabled by default. Run command no evpn mh disable-advertise-svi-mac to enable SVI MAC advertise to BGP.

[Use Cases]

sonic# configure terminal
sonic(config)# evpn mh disable-advertise-svi-mac

[Command]

evpn mh mac-holdtime holdtime

[Purpose]

Set MAC table entry hold time.

[Parameters]

ParameterDescription
holdtimeSet the hold time in seconds, the range is 0-86400. It indicates how long at least the MAC entries on the local side will be aged after the locally learned MAC entries of the ES peer are aged. The default value is 18 minutes and it is recommended to set it to 0.

[View]

Global Configuration View

[Notes]

Run command no evpn mh mac-holdtime to delete the hold time configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# evpn mh mac-holdtime 0

[Command]

evpn mh neigh-holdtime holdtime

[Purpose]

Set neighbor table entry hold time.

[Parameters]

ParameterDescription
holdtimeSet the hold time in seconds, the range is 0-86400. It indicates how long at least the neighbor entries on the local side will be aged after the locally learned neighbor entries of the ES peer are aged. The default value is 18 minutes and it is recommended to set it to 0.

[View]

Global Configuration View

[Notes]

Run command no evpn mh neigh-holdtime to delete the hold time configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# evpn mh neigh-holdtime 0

[Command]

evpn mh redirect-off

[Purpose]

Enable fast failover on control plane.

[View]

Global Configuration View

[Notes]

This feature is disabled by default and is recommended to be enabled. Run command no evpn mh redirect-off to disable fast failover.

[Use Cases]

sonic# configure terminal
sonic(config)# evpn mh redirect-off

[Command]

evpn mh es-id {ESI|es-id}

[Purpose]

Configure ESI.

[Parameters]

ParameterDescription
ESISet a 10-byte ESI in the format 00:AA:BB:CC:DD:EE:FF:GG:HH:II.
es-idThe range is 1-16777215.

[View]

LAGIF Configuration View

[Notes]

There are two methods to configure ESI: 1. Directly set a unique 10-byte ESI in the format 00:AA:BB:CC:DD:EE:FF:GG:HH:II; 2. Set es-id and es-sys-mac, and then form a unique 10-byte ESI with reserved bits. Run command no evpn mh es-id to delete the ESI.

[Use Cases]

sonic# configure terminal
sonic(config)# interface link-aggregation 123
sonic(config-lagif-123)# evpn mh es-id 03:00:00:01:00:00:02:00:00:c9
sonic# configure terminal
sonic(config)# interface link-aggregation 124
sonic(config-lagif-124)# evpn mh es-id 100
sonic(config-lagif-124)# evpn mh es-sys-mac 00:00:01:00:00:10

[Command]

evpn mh es-sys-mac HH:HH:HH:HH:HH:HH

[Purpose]

Set the ES system MAC.

[Parameters]

ParameterDescription
HH:HH:HH:HH:HH:HHMAC address.

[View]

LAGIF Configuration View

[Notes]

Run command no evpn mh es-sys-mac to delete the ES system MAC.

[Use Cases]

sonic# configure terminal
sonic(config)# interface link-aggregation 125
sonic(config-lagif-125)# evpn mh es-sys-mac 00:00:01:00:00:10

[Command]

evpn mh es-df-pref preference

[Purpose]

Set the preference for DF election.

[Parameters]

ParameterDescription
preferenceSet the preference for DF election. The range is 1-65535. The device with the largest value will be the Designated Forwarder (DF) for this ES.

[View]

LAGIF Configuration View

[Notes]

Run command no evpn mh es-df-pref to restore the preference to the default value 32767.

[Use Cases]

sonic# configure terminal
sonic(config)# interface link-aggregation 126
sonic(config-lagif-126)# evpn mh es-df-pref 0

[Command]

evpn unique-ip vlan vlan-id

[Purpose]

Enable EVPN Unique IP feature.

[Parameters]

ParameterDescription
vlan-idVLAN ID, the range is [1,4094].

[View]

Global Configuration View

[Notes]

This feature is not enabled by default. When enabled, the gateway of a couple of ES peers is allowed to have different MAC and IP addresses configured. Run command no evpn unique-ip vlan vlan-id to disable the EVPN Unique IP feature.

[Use Cases]

sonic# configure terminal
sonic(config)# evpn unique-ip vlan 25