VxLAN Configuration and Show Commands

Table of Contents

VxLAN Configuration Commands

VxLAN Show Commands

Example model & SONiC version:

  • Aurora 830, Aurora 721, Aurora 621
  • Netberg SONiC: sonic-broadcom-202311.n0

VxLAN Configuration Commands

Considerations:

  • VNI (VxLAN Network Identifier) – uniquely identifies the VxLAN.
  • VTEP (Virtual Tunnel End Point) – the entity that performs the encapsulation and decapsulation of packets.
    • One switch can have only one VTEP with a unique identifier, such as the Loopback0 IP address.
  • NVO (Network Virtualization Overlay) – only one NVO is allowed on one device.
  • In the VXLAN-MCLAG scenario, when the actual physical port members of the tunnel mapping change, the tunnel must be deleted first, and the tunnel needs to be established after the port changes are completed.

config vxlan

This command configures VTEP Source IP.

config vxlan { add | del } <vxlan_name> <src_ipv4>

Parameter Description

add: Add VxLAN VTEP and source IP.
del: Delete VxLAN VTEP.
vxlan_name: A VTEP name.
src_ipv4: IPv4 address in dotted notation A.B.C.D.

Example

sudo config vxlan add vtep 1.1.1.1

config vxlan evpn_nvo

This command configures NVO.

config vxlan evpn_nvo { add | del }  <nvo_name> <vxlan_name>

Parameter Description

add: Add VxLAN VTEP and source IP.
del: Delete VxLAN VTEP.
nvoname: NVO name.
vxlan_name: A VTEP name configured by the previous command.

Example

sudo config vxlan evpn_nvo add nvo vtep

config vxlan map

This command creates VLAN-VNI mapping on the VTEP with name <vxlan_name>.

config vxlan map { add | del } <vxlan_name> <vlan_id> <vni>

Parameter Description

add: Add VxLAN VTEP and source IP.
del: Delete VxLAN VTEP.
vxlan_name: A VTEP name configured by the previous command.
vlan_id: VLAN ID.
vni: VxLAN ID.

Example

sudo config vxlan map add vtep 100 1000

config vxlan map_range

This command creates a range VLAN-VNI mapping.

config vxlan map_range { add | del } <vxlan_name> <vlan_start> <vlan_end> <vni_start>

Parameter Description

add: Add VxLAN VTEP and source IP.
del: Delete VxLAN VTEP.
vxlan_name: A VTEP name configured by the previous command.
vlan_start: VLAN ID range beginning.
vlan_end: VxLAN ID range end.
vni_start: VxLAN ID.

VxLAN Show Commands

show vxlan tunnel

This command displays brief information about VxLANs configured in the device. It displays a VxLAN tunnel name, source IP address, destination IP address, and VLAN VNI tunnel mappings.

show vxlan tunnel

Example

admin@sonic:~$ show vxlan tunnel
vxlan tunnel name    source ip    destination ip    tunnel map name    tunnel map mapping(vni -> vlan)
-------------------  -----------  ----------------  -----------------  ---------------------------------
vtep                 10.10.10.1                     map_1000_Vlan100   1000 -> Vlan100

show vxlan name <vxlan_name>

Show vxlan name <vxlan_name> information for a specified VxLAN tunnel.

show vxlan name <vxlan_name>

Example:

admin@sonic:~$ show vxlan tunnel vtep
vxlan tunnel name    source ip    destination ip    tunnel map name    tunnel map mapping(vni -> vlan)
-------------------  -----------  ----------------  -----------------  ---------------------------------
vtep                 10.10.10.1                     map_1000_Vlan100   1000 -> Vlan100

show vxlan interface

Show VXLAN VTEP Information

show vxlan interface

Example:

admin@admin:~$ show vxlan interface
VTEP Information:
       VTEP Name : vtep, SIP  : 10.10.10.1
       NVO Name  : nvo,  VTEP : vtep
       Source interface  : Loopback0

show vxlan vlanvnimap

Show VLAN VNI Mapping Information.

show vxlan vlanvnimap

Example:

admin@admin:~$ show vxlan vlanvnimap
+---------+-------+
| VLAN    |   VNI |
+=========+=======+
| Vlan100 |  1000 |
+---------+-------+
Total count : 1

show vxlan vrfvnimap

Show VRF VNI Mapping Information.

admin@sonic:~$ show vxlan vrfvnimap
+-------+-------+
| VRF   | VNI   |
+=======+=======+
| Vrf-1 | 1000  |
+-------+-------+
Total count : 1

show vxlan remotemac

Show MACs pointing to the remote VTEP.

show vxlan remotemac <REMOTE_VTEP_IP> [COUNT]

Parameter Description

REMOTE_VTEP_IP: VTEP with the specificed IP address
all: All VTEPs
count: Number of remote MAC addresses

Example

admin@admin:~$ show vxlan remotemac 10.10.10.101
+--------+-------------------+--------------+-------+---------+
| VLAN   | MAC               | RemoteVTEP   |   VNI | Type    |
+========+===================+==============+=======+=========+
| Vlan100 | b4:96:91:b3:c7:c8 | 10.10.10.101 |  1000 | dynamic |
+--------+-------------------+--------------+-------+---------+
Total count : 1
admin@admin:~$ show vxlan remotemac all
+--------+-------------------+--------------+-------+---------+
| VLAN   | MAC               | RemoteVTEP   |   VNI | Type    |
+========+===================+==============+=======+=========+
| Vlan100 | b4:96:91:b3:c7:c8 | 10.10.10.101 |  1000 | dynamic |
+--------+-------------------+--------------+-------+---------+
Total count : 1

show vxlan remotevni

Show Vlans extended to the remote VTEP.

show vxlan remotevni <REMOTE_VTEP_IP> [COUNT]

Parameter Description

REMOTE_VTEP_IP: VTEP with the specificed IP address
all: All VTEPs
count: Number of remote MAC addresses
admin@sonic:~$ show vxlan remote_vni all
+---------+--------------+-------+
| VLAN    | RemoteVTEP   | VNI   |
+=========+==============+=======+
| Vlan100 | 10.10.10.101 | 1000  |
+---------+--------------+-------+
Total count : 1
admin@sonic:~$ show vxlan remote_vni 10.10.10.101
+---------+--------------+-------+
| VLAN    | RemoteVTEP   | VNI   |
+=========+==============+=======+
| Vlan100 | 10.10.10.101 | 1000  |
+---------+--------------+-------+
Total count : 1

show vxlan remotevtep

Show All Remote VTEP Information (a.k.a. VxLAN tunnels) learnt by EVPN/VxLAN.

show vxlan remotevtep

Example

admin@sonic:~$ show vxlan remotevtep
+--------------+------------+-------------------+--------------+
| SIP          | DIP        | Creation Source   | OperStatus   |
+==============+============+===================+==============+
| 10.10.10.101 | 10.10.10.1 | EVPN              | oper_up      |
+--------------+------------+-------------------+--------------+
Total count : 1

show vxlan counters

Show VxLAN counters.

show vxlan counters [OPTIONS] [TUNNEL]

Parameter description

-p, --period TEXT
--verbose          Enable verbose output
admin@sonic:~$ show vxlan counters
  IFACE    RX_PKTS    RX_BYTES    RX_PPS    TX_PKTS    TX_BYTES    TX_PPS
-------  ---------  ----------  --------  ---------  ----------  --------
NEWS

Latest news