Command Line Reference
VXLAN Configuration
22 min
vxlan configuration vxlan configuration show vxlan tunnel 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 show vxlan vtep status \[command] show vxlan vtep status \[purpose] view vxlan tunnel configuration \[view] system view \[use cases] sonic# show vxlan status running configuration local vtep ip 120 1 1 122 mode distributed temp configuration(need to restart to take effect) local vtep ip 120 1 1 122 mode distributed show vxlan map 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 show vrf vni \[command] show vrf vni \[purpose] view the binding relationship between vrf and vni \[view] system view \[use cases] sonic# show vrf vni vrf vni vxlan if l3 svi state rmac user a 1 vxlan1 brvxlan1 up 00 11 24 1a 1b 61 userb 2000 vxlan2000 brvxlan2000 up 00 11 24 1a 1b 61 show vrf brief 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 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/s vttnl120 1 1 122 120 1 1 224 0 0 00/s 16782236 0 00/s interface vxlan 0 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 0 sonic(config vxlanif 0)# source 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 0 sonic(config vxlanif 0)# source 30 11 0 80 source centralized 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 0 sonic(config vxlanif 0)# source 30 11 0 80 centralized vni vni \[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 500 sonic(config vlan 10)# vni 500 xconnect 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 500 sonic(config vlan 10)# xconnect vni peer 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 0 sonic(config vxlanif 0)# vni 500 peer 30 11 0 100 vni mcast group 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 0 sonic(config vxlanif 0)# vni 500 mcast group 224 1 1 1 address family l2vpn evpn 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 65100 sonic(config router)# address family l2vpn evpn sonic(config router af)# neighbor activate 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 65100 sonic(config router)# address family l2vpn evpn sonic(config router af)# neighbor 1 1 1 1 activate advertise all vni 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 65100 sonic(config router)# address family l2vpn evpn sonic(config router af)# advertise all vni
