Virtualization Configuration
VXLAN View
Section titled “VXLAN View”Table 1 VXLAN View
Command | Purpose |
---|---|
show vxlan map | Display VXLAN mapping. |
show vxlan tunnel | Display VXLAN tunnels. |
show vxlan statistics vxlan_interface_name peer peer-ip vni vni-id | Display VXLAN statistic. |
clear vxlan static vxlan_interface_name peer peer-ip vni vni-id | Clear VXLAN statistic. |
show vxlan remotemac {all|A.B.C.D} | Display VXLAN remote MAC entries. |
show vxlan map
Section titled “show vxlan map”[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 |+-------+--------+-------+
show vxlan tunnel
Section titled “show vxlan tunnel”[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]
Parameter | Description |
---|---|
vxlan_interface_name | VXLAN interface name. |
peer-ip | Remote VTEP IP. |
vni-id | VXLAN 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]
Parameter | Description |
---|---|
vxlan_interface_name | VXLAN interface name. |
peer-ip | Remote VTEP IP. |
vni-id | VXLAN 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
show vxlan remotemac {all|A.B.C.D}
Section titled “show vxlan remotemac {all|A.B.C.D}”[Command]
show vxlan remotemac {all|A.B.C.D}
[Purpose]
Display VXLAN remote MAC entries.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 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 : 2sonic# 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
VXLAN Config
Section titled “VXLAN Config”Table 2 VXLAN Config
Command | Purpose |
---|---|
interface vxlan vxlan_interface_name | Configure VXLAN interface. |
mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id vxlanvni vni-id peer peer-ip | Configure static MAC entry for VXLAN. |
source ip-address | Set 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-id | Configure static routes for VXLAN. |
address-family l2vpn evpn | Enter L2VPN EVPN Address-family View |
neighbor A.B.C.D activate | Enable EVPN of BGP neighbors. |
advertise-all-vni | Enable advertisement of all VNIs. |
advertise ipv4 unicast | Enable type-5 route advertisement. |
table-map map_name | Add a route leak policy. |
import vrf vrf_name | Specify the VRF of route leak. |
vxlan statistics peer peer-ip vni vni-id enable | Configure EVPN Layer 3 tunnel traffic statistics. |
vxlan mode centralized | Enable VXLAN centralized gateway. |
vxlan udp-port port-number | Specify the UDP destination port number used for VXLAN encapsulation. |
rd rd-num | Configure the RD for Layer 2 VNI. |
route-target {both|import|export} rt-num | Configure the RT for Layer 2 VNI. |
rd rd-num | Configure the RD for Layer 3 VNI. |
route-target {both|import|export} rt-num | Configure the RT for Layer 3 VNI. |
interface vxlan vxlan_interface_name
Section titled “interface vxlan vxlan_interface_name”[Command]
interface vxlan vxlan_interface_name
[Purpose]
Configure VXLAN interface.
[Parameters]
Parameter | Description |
---|---|
vxlan_interface_name | VXLAN 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 terminalsonic(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]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address. |
vlan-id | VLAN ID, the range is [1,4094]. |
vni-id | VXLAN Network Identifier, VNI. |
peer-ip | Remote 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 terminalsonic(config)# mac-address static 18:17:25:37:65:0a vlan 100 vxlan vni 10 peer 20.0.0.2
source ip-address
Section titled “source ip-address”[Command]
source ip-address
[Purpose]
Set local VTEP IP of VXLAN.
[Parameters]
Parameter | Description |
---|---|
ip-address | Local VTEP IP address. |
[View]
VXLAN Interface Configuration View
[Notes]
Run command no source to delete VXLAN local_vtep_ip
[Use Cases]
sonic# configure terminalsonic(config)# interface vxlan 0sonic(config-vxlanif-0)# source 10.0.0.1
vni vni-id [vxlan vxlan_interface_name]
Section titled “vni vni-id [vxlan vxlan_interface_name]”[Command]
vni vni-id [vxlan vxlan_interface_name]
[Purpose]
Add VXLAN mapping.
[Parameters]
Parameter | Description |
---|---|
vni-id | VXLAN Network Identifier, VNI. |
vxlan_interface_name | VXLAN 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 terminalsonic(config)# vni 1sonic(config)# vlan 100sonic(config-vlan-100)# vni 2sonic(config)# vrf 123sonic(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]
Parameter | Description |
---|---|
A.B.C.D/M | Specify the destination network segment for routing. |
A.B.C.D | Specify the IP address of next hop of the route. |
vni-id | VXLAN 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 terminalsonic(config)# ip route 20.0.0.0/24 10.0.0.57 vxlan-vni 200
address-family l2vpn evpn
Section titled “address-family l2vpn evpn”[Command]
address-family l2vpn evpn
[Purpose]
Enter L2VPN EVPN Address-family View
[View]
BGP Configuration View
[Use Cases]
sonic# configsonic(config)# router bgp 65227sonic(config-router)# address-family l2vpn evpn
neighbor A.B.C.D activate
Section titled “neighbor A.B.C.D activate”[Command]
neighbor A.B.C.D activate
[Purpose]
Enable EVPN of BGP neighbors.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | BGP 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# configsonic(config)# router bgp 65227sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# neighbor 68.0.0.1 activate
advertise-all-vni
Section titled “advertise-all-vni”[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# configsonic(config)# router bgp 65227sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# advertise-all-vni
advertise ipv4 unicast
Section titled “advertise ipv4 unicast”[Command]
advertise ipv4 unicast
[Purpose]
Enable type-5 route advertisement.
[View]
BGP EVPN Address-family View
[Use Cases]
sonic# configsonic(config)# router bgp 65227sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# advertise ipv4 unicast
table-map map_name
Section titled “table-map map_name”[Command]
table-map map_name
[Purpose]
Add a route leak policy.
[Parameters]
Parameter | Description |
---|---|
map_name | Route 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# configsonic(config)# router bgp 65227sonic(config-router)# address-family ipv4 unicastsonic(config-router-af)# table-map RM_ROUTE_LEAK_2000
import vrf vrf_name
Section titled “import vrf vrf_name”[Command]
import vrf vrf_name
[Purpose]
Specify the VRF of route leak.
[Parameters]
Parameter | Description |
---|---|
vrf_name | Specify 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# configsonic(config)# router bgp 65227sonic(config-router)# address-family ipv4 unicastsonic(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]
Parameter | Description |
---|---|
peer-ip | Remote VTEP IP. |
vni-id | VXLAN 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# configsonic(config)# interface vxlan 0sonic(config-vxlanif-0)# vxlan statistics peer 10.1.0.226 vni 1000 enable
vxlan mode centralized
Section titled “vxlan mode centralized”[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# configsonic(config)# vxlan mode centralized
vxlan udp-port port-number
Section titled “vxlan udp-port port-number”[Command]
vxlan udp-port port-number
[Purpose]
Specify the UDP destination port number used for VXLAN encapsulation.
[Parameters]
Parameter | Description |
---|---|
port-number | Range 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# configsonic(config)# vxlan udp-port 7788
rd rd-num
Section titled “rd rd-num”[Command]
rd rd-num
[Purpose]
Configure the RD for Layer 2 VNI.
[Parameters]
Parameter | Description |
---|---|
rd-num | The 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# configsonic(config)# router bgp 65100sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# vni 26sonic(config-router-af-vni)# rd 11:22
route-target {both|import|export} rt-num
Section titled “route-target {both|import|export} rt-num”[Command]
route-target {both|import|export} rt-num
[Purpose]
Configure the RT for Layer 2 VNI.
[Parameters]
Parameter | Description |
---|---|
both|import|export | Decide the direction in which RT takes effect. |
rt-num | The 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# configsonic(config)# router bgp 65100sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# vni 26sonic(config-router-af-vni)# route-target both 12.3.4.5:66
rd rd-num
Section titled “rd rd-num”[Command]
rd rd-num
[Purpose]
Configure the RD for Layer 3 VNI.
[Parameters]
Parameter | Description |
---|---|
rd-num | The 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# configsonic(config)# router bgp 65100 vrf 132sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# rd 55:120
route-target {both|import|export} rt-num
Section titled “route-target {both|import|export} rt-num”[Command]
route-target {both|import|export} rt-num
[Purpose]
Configure the RT for Layer 3 VNI.
[Parameters]
Parameter | Description |
---|---|
both|import|export | Decide the direction in which RT takes effect. |
rt-num | The 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# configsonic(config)# router bgp 65100 vrf 132sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# route-target both 65207:66
EVPN Multihoming
Section titled “EVPN Multihoming”EVPN Multihoming View
Section titled “EVPN Multihoming View”Table 3 EVPN Multihoming View
Command | Purpose |
---|---|
show evpn es {detail|json|ESI} | Display the ES detailed status information. |
show evpn es {detail|json|ESI}
Section titled “show evpn es {detail|json|ESI}”[Command]
show evpn es {detail|json|ESI}
[Purpose]
Display the ES detailed status information.
[Parameters]
Parameter | Description |
---|---|
ESI | Specify the ESI. |
[View]
Privileged User View
[Use Cases]
sonic# show evpn es detailESI: 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
EVPN Multihoming Config
Section titled “EVPN Multihoming Config”Table 4 EVPN Multihoming Config
Command | Purpose |
---|---|
evpn mh disable-advertise-svi-mac | Disable SVI MAC advertise to BGP. |
evpn mh mac-holdtime holdtime | Set MAC table entry hold time. |
evpn mh neigh-holdtime holdtime | Set neighbor table entry hold time. |
evpn mh redirect-off | Enable fast failover on control plane. |
evpn mh es-id {ESI|es-id} | Configure ESI. |
evpn mh es-sys-mac HH:HH:HH:HH:HH:HH | Set the ES system MAC. |
evpn mh es-df-pref preference | Set the preference for DF election. |
evpn unique-ip vlan vlan-id | Enable EVPN Unique IP feature. |
evpn mh disable-advertise-svi-mac
Section titled “evpn mh disable-advertise-svi-mac”[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 terminalsonic(config)# evpn mh disable-advertise-svi-mac
evpn mh mac-holdtime holdtime
Section titled “evpn mh mac-holdtime holdtime”[Command]
evpn mh mac-holdtime holdtime
[Purpose]
Set MAC table entry hold time.
[Parameters]
Parameter | Description |
---|---|
holdtime | Set 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 terminalsonic(config)# evpn mh mac-holdtime 0
evpn mh neigh-holdtime holdtime
Section titled “evpn mh neigh-holdtime holdtime”[Command]
evpn mh neigh-holdtime holdtime
[Purpose]
Set neighbor table entry hold time.
[Parameters]
Parameter | Description |
---|---|
holdtime | Set 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 terminalsonic(config)# evpn mh neigh-holdtime 0
evpn mh redirect-off
Section titled “evpn mh redirect-off”[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 terminalsonic(config)# evpn mh redirect-off
evpn mh es-id {ESI|es-id}
Section titled “evpn mh es-id {ESI|es-id}”[Command]
evpn mh es-id {ESI|es-id}
[Purpose]
Configure ESI.
[Parameters]
Parameter | Description |
---|---|
ESI | Set a 10-byte ESI in the format 00:AA:BB:CC:DD:EE:FF:GG:HH:II. |
es-id | The 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 terminalsonic(config)# interface link-aggregation 123sonic(config-lagif-123)# evpn mh es-id 03:00:00:01:00:00:02:00:00:c9sonic# configure terminalsonic(config)# interface link-aggregation 124sonic(config-lagif-124)# evpn mh es-id 100sonic(config-lagif-124)# evpn mh es-sys-mac 00:00:01:00:00:10
evpn mh es-sys-mac HH:HH:HH:HH:HH:HH
Section titled “evpn mh es-sys-mac HH:HH:HH:HH:HH:HH”[Command]
evpn mh es-sys-mac HH:HH:HH:HH:HH:HH
[Purpose]
Set the ES system MAC.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address. |
[View]
LAGIF Configuration View
[Notes]
Run command no evpn mh es-sys-mac to delete the ES system MAC.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 125sonic(config-lagif-125)# evpn mh es-sys-mac 00:00:01:00:00:10
evpn mh es-df-pref preference
Section titled “evpn mh es-df-pref preference”[Command]
evpn mh es-df-pref preference
[Purpose]
Set the preference for DF election.
[Parameters]
Parameter | Description |
---|---|
preference | Set 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 terminalsonic(config)# interface link-aggregation 126sonic(config-lagif-126)# evpn mh es-df-pref 0
evpn unique-ip vlan vlan-id
Section titled “evpn unique-ip vlan vlan-id”[Command]
evpn unique-ip vlan vlan-id
[Purpose]
Enable EVPN Unique IP feature.
[Parameters]
Parameter | Description |
---|---|
vlan-id | VLAN 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 terminalsonic(config)# evpn unique-ip vlan 25