Command Line Reference
Virtualization and Tunnel Conf...
VXLAN and BGP-EVPN
35 min
vxlan and bgp evpn view vxlan and bgp evpn view table 1 vxlan and bgp evpn view table 1 vxlan and bgp evpn 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 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 show vxlan tunnel \[command] show vxlan tunnel \[purpose] display vxlan tunnels \[view] privileged user view \[use cases] sonic# show vxlan tunnel show vxlan statistics 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 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| 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 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 vxlan and evpn config vxlan and evpn config table 2 vxlan and bgp evpn config table 2 vxlan and bgp evpn 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 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 terminal sonic(config)# interface vxlan 0 mac address static 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 terminal sonic(config)# mac address static 18 17 25 37 65 0a vlan 100 vxlan vni 10 peer 20 0 0 2 source 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 terminal sonic(config)# interface vxlan 0 sonic(config vxlanif 0)# source 10 0 0 1 vni 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 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 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 terminal sonic(config)# ip route 20 0 0 0/24 10 0 0 57 vxlan vni 200 address family l2vpn evpn address family l2vpn evpn \[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 neighbor 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# config sonic(config)# router bgp 65227 sonic(config router)# address family l2vpn evpn sonic(config router af)# neighbor 68 0 0 1 activate advertise all vni 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# config sonic(config)# router bgp 65227 sonic(config router)# address family l2vpn evpn sonic(config router af)# advertise all vni advertise ipv4 unicast advertise ipv4 unicast \[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 table map 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# config sonic(config)# router bgp 65227 sonic(config router)# address family ipv4 unicast sonic(config router af)# table map rm route leak 2000 import vrf 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# config sonic(config)# router bgp 65227 sonic(config router)# address family ipv4 unicast sonic(config router af)# import vrf 200 vxlan statistics peer 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# config sonic(config)# interface vxlan 0 sonic(config vxlanif 0)# vxlan statistics peer 10 1 0 226 vni 1000 enable vxlan mode centralized 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# config sonic(config)# vxlan mode centralized vxlan udp port 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# config sonic(config)# vxlan udp port 7788 rd 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# 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 route target {both|import|export} 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# 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 rd 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# config sonic(config)# router bgp 65100 vrf 132 sonic(config router)# address family l2vpn evpn sonic(config router af)# rd 55 120 route target {both|import|export} 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# config sonic(config)# router bgp 65100 vrf 132 sonic(config router)# address family l2vpn evpn sonic(config router af)# route target both 65207 66
