VXLAN Configuration
VXLAN Configuration
Section titled “VXLAN Configuration”show vxlan tunnel
Section titled “show vxlan tunnel”[Command]
show vxlan tunnel
[Purpose]
View VxLAN tunnel status
[View]
System view
[Use Cases]
sonic# show vxlan tunnel+----------------------------+-------+| tunnel | vni |+============================+=======+| VTTNL30.11.0.83_30.11.0.85 | 500 |+----------------------------+-------+
show vxlan vtep-status
Section titled “show vxlan vtep-status”[Command]
show vxlan vtep-status
[Purpose]
View Vxlan tunnel configuration
[View]
System view
[Use Cases]
sonic# show vxlan statusrunning configuration:local_vtep_ip : 120.1.1.122mode : distributed
temp configuration(Need to restart to take effect):local_vtep_ip : 120.1.1.122mode : distributed
show vxlan map
Section titled “show vxlan map”[Command]
show vxlan map
[Purpose]
View the binding relationship between VLAN and VNI, as well as the status of xconnect on the VLAN.
[View]
System view
[Use Cases]
sonic# show vxlan map+----------+--------+-------+----------+------------+| vni | vlan | vrf | bridge | xconnect |+==========+========+=======+==========+============+| 2 | 2 | | | true |+----------+--------+-------+----------+------------+| 3 | 3 | | | false |+----------+--------+-------+----------+------------+
show vrf vni
Section titled “show vrf vni”[Command]
show vrf vni
[Purpose]
View the binding relationship between VRF and VNI
[View]
System view
[Use Cases]
sonic# show vrf vniVRF VNI VxLAN IF L3-SVI State Rmacuser-A 1 Vxlan1 Brvxlan1 Up 00:11:24:1a:1b:61userB 2000 Vxlan2000 Brvxlan2000 Up 00:11:24:1a:1b:61
show vrf brief
Section titled “show vrf brief”[Command]
show vrf brief
[Purpose]
View the information of VRF
[View]
System view
[Use Cases]
sonic# show vrf brief+------------+-------+-----------+| vrf name | vni | src_mac |+============+=======+===========+| 100 | | |+------------+-------+-----------+| 200 | 2000 | |+------------+-------+-----------+
show counters tunnel
Section titled “show counters tunnel”[Command]
show counters tunnel
clear counters tunnel
[Purpose]
View VXLAN tunnel statistics
[View]
System view
[Use Cases]
sonic# show counters tunnel IFACE RX_OK RX_PPS TX_OK TX_PPS---------------------------- ------- -------- --------- --------VTTNL120.1.1.122_120.1.1.216 0 0.00/s 16782288 0.00/sVTTNL120.1.1.122_120.1.1.224 0 0.00/s 16782236 0.00/s
interface vxlan 0
Section titled “interface vxlan 0”[Command]
interface vxlan 0
no interface vxlan 0
[Purpose]
Create a VxLAN tunnel
[View]
System configuration view
[Usage Scenario]
To fully leverage the advantages of device virtualization and meet the requirements of multi-tenant access, deploying VxLAN is essential. As the relevant information for VxLAN tunnels needs to be configured on VxLAN interfaces, this command is executed to create VxLAN interfaces.
[Use Cases]
sonic(config)# interface vxlan 0sonic(config-vxlanif-0)#
source
Section titled “source”[Command]
source A.B.C.D
no source A.B.C.D
[Purpose]
Specifies the IP address of a local VTEP
Parameter | Description |
---|---|
A.B.C.D | IP address of local VTEP |
[View]
VxLAN view
[Usage Scenario]
VTEP, as the tunnel endpoint for VxLAN, is responsible for encapsulating and decapsulating VxLAN packets. This command is used to configure the IP address for the local VTEP, which serves as the source IP address for VxLAN packets.
This IP address can be assigned to a physical interface or preferably to the Loopback interface.
[Use Cases]
sonic(config)# interface vxlan 0sonic(config-vxlanif-0)# source 30.11.0.80
source centralized
Section titled “source centralized”[Command]
source A.B.C.D centralized
no source A.B.C.D centralized
[Purpose]
Configure the local VTEP IP address and specify the current VTEP as the centralized gateway
Parameter | Description |
---|---|
A.B.C.D | IP address of local VTEP |
[View]
VxLAN view
[Usage Scenario]
In a centralized VxLAN gateway scenario, use the centralized parameter to specify that the current device is the device where the centralized gateway is located.
[Use Cases]
sonic(config)# interface vxlan 0sonic(config-vxlanif-0)# source 30.11.0.80 centralized
[Command]
vni VNI_ID
no vni VNI_ID
[Purpose]
Associated a specified VNI with a VLAN
Parameter | Description |
---|---|
VNI_ID | VNI_ID,range (1..16777215) |
[View]
VLAN view
[Usage Scenario]
In VxLAN networks, VNI (Virtual Network Identifier) functions similarly to VLAN ID and can be used to identify tenants. The device determines the corresponding VNI based on the VLAN information carried in the received packets.
When a source VTEP corresponds to multiple remote VTEPs, the device replicates the received BUM (Broadcast, Unknown unicast, Multicast) packets and sends them to all remote VTEPs belonging to the same VNI. Similarly, when receiving VxLAN packets, the device removes the VxLAN header and broadcasts the content within the corresponding VLAN broadcast domain based on the VNI information.
[Use Cases]
sonic(config)# vlan 500sonic(config-vlan-10)# vni 500
xconnect
Section titled “xconnect”[Command]
xconnect
no xconnect
[Purpose]
Configure VLAN to enable xconnect functionality.
[View]
VLAN view
[Usage Scenario]
In VxLAN networks, when the xconnect is enabled on a VLAN, the VLAN does not dynamically learn MAC addresses, and all data received by this VLAN will be forwarded through the multicast VxLAN tunnel corresponding to the VLAN. If no multicast VxLAN tunnel is configured, it will be forwarded to all remote VTEPs via head-end replication over the unicast tunnel.
[Use Cases]
sonic(config)# vlan 500sonic(config-vlan-10)# xconnect
vni peer
Section titled “vni peer”[Command]
vni VNI_ID peer A.B.C.D [rmac nn:nn:nn:nn:nn:nn ]
no vni peer
[Purpose]
Configure an ingress replication list that contains the IP addresses of those remote VTEPs for a VxLAN network identifier
[Parameter]
Parameter | Description |
---|---|
VNI_ID | VNI_ID,range (1..16777215) |
A.B.C.D | IP address of remote VTEP |
nn:nn:nn:nn:nn:nn | Mac address of remote VTEP |
[View]
VxLAN view
[User Scenario] Static specification of the remote VTEP address and VNI information. The device supports the establishment of VxLAN tunnels through static configuration and interaction with the BGP EVPN protocol.
[Notes]
In scenarios where VxLAN distributed gateways are deployed, on devices serving as distributed gateways, the same VTEP MAC needs to be configured to ensure seamless migration of terminals in the VxLAN network. By default, this MAC address is the system MAC address.
[Use Cases]
sonic(config)# interface vxlan 0sonic(config-vxlanif-0)# vni 500 peer 30.11.0.100
vni mcast-group
Section titled “vni mcast-group”[Command]
vni VNI_ID mcast-group A.B.C.D
no vni VNI_ID mcast-group A.B.C.D
[Purpose]
Configure the mapping relationship between VNI and multicast tunnel
[Parameter]
Parameter | Description |
---|---|
VNI_ID | VNI_ID,range (1..16777215) |
A.B.C.D | Multicast tunnel IP address |
[View]
VxLAN view
[User Scenario] In VxLAN networks, VNI (Virtual Network Identifier) functions similarly to VLAN ID and can be used to identify tenants. The device determines the corresponding VNI based on the VLAN information carried in the received packets.
When a multicast tunnel is configured for a VNI, the BUM traffic received by the local VTEP will no longer be replicated to all VTEPs through head-end replication. Instead, it will be encapsulated into multicast VXLAN packets for forwarding.
Similarly, when receiving VxLAN packets, the device removes the VxLAN header and broadcasts the content within the corresponding VLAN broadcast domain based on the VNI information.
[Notes]
When configuring the multicast VxLAN mapping relationship for a VNI, it is necessary to ensure that local PIM entries are available for multicast VxLAN service forwarding.
Typically, static PIM entries are configured on the Loopback0 of the local VTEP to guide the forwarding of encapsulated multicast VxLAN packets.
[Use Cases]
sonic(config)# interface vxlan 0sonic(config-vxlanif-0)# vni 500 mcast-group 224.1.1.1
address family l2vpn evpn
Section titled “address family l2vpn evpn”[Command]
address-family l2vpn evpn
[Purpose]
Enter EVPN address group view
[View]
BGP view
[Usage Scenario]
When dynamically establishing VxLAN tunnels using the BGP protocol, execute this command in the BGP view. Enter the EVPN address family configuration view to establish BGP EVPN peers.
[Use Cases]
sonic(config)# router bgp 65100sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)#
neighbor activate
Section titled “neighbor activate”[Command]
neighbor { A.B.C.D | X:X::X:X | String } activate
[Purpose]
Enables the exchange of relevant routing information with a specified peer/peer group
[Parameter]
Parameter | Description |
---|---|
A.B.C.D | X:X::X:X |
String | Specifies the name of the peer group |
[View]
EVPN address family view
[Notes]
User need to establish a BGP peer relationship with the IP address first
[Use Cases]
sonic(config)# router bgp 65100sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# neighbor 1.1.1.1 activate
advertise-all-vni
Section titled “advertise-all-vni”[Command]
advertise-all-vni
no advertise-all-vni
[Purpose]
Configure all local VNIs to be published to peers
[View]
EVPN address family view
[Use Cases]
sonic(config)# router bgp 65100sonic(config-router)# address-family l2vpn evpnsonic(config-router-af)# advertise-all-vni