Skip to content

Layer 3 Configuration

Table 1 ARP View

CommandPurpose
show arpDisplay ARP table entries.
clear neighbor allClear all ARP table entries.
clear neighbor interface {ethernet|link-aggregation|vlan} {interface_name[.subinterface-number]}Delete the specified ARP table entries.

[Command]

show arp

[Purpose]

Display ARP table entries.

[View]

Privileged User View

[Use Cases]

sonic# show arp
Address MacAddress Iface Vlan
------------ ----------------- ----------- ------
10.10.200.2 18:17:25:37:67:3e - 200
Total number of entries 1

[Command]

clear neighbor all

[Purpose]

Clear all ARP table entries.

[View]

Privileged User View

[Use Cases]

sonic# clear neighbor all
Section titled “clear neighbor interface {ethernet|link-aggregation|vlan} {interface_name[.subinterface-number]}”

[Command]

clear neighbor interface {ethernet|link-aggregation|vlan} {interface_name[.subinterface-number]}

[Purpose]

Delete the specified ARP table entries.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)
subinterface-numberSubinterface number.

[View]

Privileged User View

[Use Cases]

sonic# clear neighbor interface ethernet 0/2

Table 2 ARP Config

CommandPurpose
arp static A.B.C.D HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name[.subinterface-number]Configure static ARP table entries.
arp timeout aging-timeConfigure ARP aging time.
arp probe interval timeConfigure ARP probe interval.
arp probe times probe-timesConfigure ARP probe times.
Section titled “arp static A.B.C.D HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name[.subinterface-number]”

[Command]

arp static A.B.C.D HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name[.subinterface-number]

[Purpose]

Configure static ARP table entries.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address
HH:HH:HH:HH:HH:HHMAC address.
interface_nameInterface name (eg.0/1)
subinterface-numberSubinterface number.

[View]

Global Configuration View

[Notes]

Run command no arp static A.B.C.D HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name[.subinterface-number] to delete static ARP entries.

[Use Cases]

sonic# configure terminal
sonic(config)# arp static 3.3.3.3 00:00:00:00:00:01 interface vlan 5
sonic(config)# arp static 4.4.4.4 00:00:00:00:00:02 interface ethernet 0/1
sonic(config)# arp static 5.5.5.5 00:00:00:00:00:03 interface link-aggregation 1

[Command]

arp timeout aging-time

[Purpose]

Configure ARP aging time.

[Parameters]

ParameterDescription
aging-timeSpecify the aging time in seconds. The default ARP aging time is 300s, and the range is from 60 to 86400.

[View]

Global Configuration View / Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command no arp timeout to delete ARP aging time configuration and restore to default.

[Use Cases]

sonic# configure terminal
sonic(config)# arp timeout 500
sonic(config)# interface vlan 100
sonic(config-vlanif-100)# arp timeout 8500

[Command]

arp probe interval time

[Purpose]

Configure ARP probe interval.

[Parameters]

ParameterDescription
timeSpecify the interval in seconds, the default value is 6 seconds, and the range is 1~65535.

[View]

Global Configuration View / Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command no arp probe interval to delete the ARP probe interval configuration and restore the default value.

[Use Cases]

sonic# configure terminal
sonic(config)# arp probe interval 10
sonic(config)# interface ethernet 0/80
sonic(config-if-0/80)# arp probe interval 5
sonic(config-if-0/80)# no arp probe interval

[Command]

arp probe times probe-times

[Purpose]

Configure ARP probe times.

[Parameters]

ParameterDescription
probe-timesSpecify ARP probe times, the default value is 5 times, and the range is 1~65535.

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command no arp probe times to delete the ARP probe times configuration and restore the default value.

[Use Cases]

sonic# configure terminal
sonic(config)# arp probe times 10
sonic(config)# interface ethernet 0/80
sonic(config-if-0/80)# arp probe times 14
sonic(config-if-0/80)# no arp probe times

Table 3 NDP View

CommandPurpose
show ndpDisplay NDP table.

[Command]

show ndp

[Purpose]

Display NDP table.

[View]

Privileged User View

[Use Cases]

sonic# show ndp
Address MacAddress Iface Vlan Status
--------- ----------------- ---------- ------ ---------
2023::2 00:00:01:00:00:01 0/24 - PERMANENT
Total number of entries 1

Table 4 NDP Config

CommandPurpose
ndp static A::B HH:HH:HH:HH:HH:HH interface{ethernet|link-aggregation|vlan} interface_nameConfigure static NDP table entries.
Section titled “ndp static A::B HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name”

[Command]

ndp static A::B HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name

[Purpose]

Configure static NDP table entries.

[Parameters]

ParameterDescription
A::BIPv6 address.
HH:HH:HH:HH:HH:HHMAC address.
interface_nameInterface name (eg.0/1).

[View]

Global Configuration View

[Notes]

Run command no arp static A::B HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name to delete static NDP.

[Use Cases]

sonic# configure terminal
sonic(config)# ndp static 2023::2 00:00:01:00:00:01 interface ethernet 0/24

There are two levels of policy for ARP/ND to host:

  • Level 1: Interface-based Interface-based policies are divided into default policy and user-defined policy. The system gives priority to matching user-defined policy. If not matched, the default policy will be used. Optional actions include permit, deny, and pass. While permit and deny mean to perform ARP/ND to host route conversion and non-conversion behavior directly without matching the next level of segment policy, pass means to skip the interface policy process and enter the next level of policy.
  • Level 2: Segment-based Segment policy is also divided into default policy and user-defined segment policy. The system matches user-defined policy first, if not matched, then the default policy will be used. Optional actions include permit and deny, which correspond to ARP/ND to host route conversion and non-conversion behavior.

Table 5 ARP/ND to Host View

CommandPurpose
show arp-to-host summaryDisplay ARP/ND to Host summary info.
show arp-to-host policyDisplay ARP/ND to Host policy configuration.

[Command]

show arp-to-host summary

[Purpose]

Display ARP/ND to Host summary info.

[View]

Privileged User View

[Use Cases]

sonic# show arp-to-host summary
Vrf name Convert Fast convergence Metric
---------- --------- ------------------ --------
default enable disable 5200

[Command]

show arp-to-host policy

[Purpose]

Display ARP/ND to Host policy configuration.

[View]

Privileged User View

[Use Cases]

sonic# show arp-to-host policy
Port:
Port Policy
---------- --------
0/56 permit
Network:
Vrf name Network Policy
---------- ---------- --------
default 1.1.1.1/24 permit

Table 6 ARP to Host Config

CommandPurpose
arp-to-hostEnter ARP/ND to host Configuration View
convert enablevrf vrf_nameEnable ARP/ND-to-host for specified VRFs.
policy default_policy port vrf vrf_name {permit|deny|pass}Configure ARP/ND-to-host default interface policy.
policy port {ethernet|link-aggregation} interface_name {permit|deny|pass}Configure an ARP/ND-to-host user-defined interface policy.
policy default_policy network vrf vrf_name {permit|deny}Configure ARP/ND-to-host default segment policy.
policy network {A.B.C.D/M|X:X::X:X/M} vrf vrf_name {permit|deny}Configure ARP/ND-to-host user-defined segment policy.

[Command]

arp-to-host

[Purpose]

Enter ARP/ND-to-host Configuration View

[View]

Global Configuration View

[Use Cases]

sonic# configure terminal
sonic(config)# arp-to-host
sonic(config-arp-to-host)# convert enable vrf default

[Command]

convert enable vrf vrf_name

[Purpose]

Enable ARP/ND-to-host for specified VRFs.

[Parameters]

ParameterDescription
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

ARP/ND-to-host Configuration View

[Notes]

Run command no convert enable vrf vrf_name to disable ARP/ND-to-host for specified VRFs.

[Use Cases]

sonic# configure terminal
sonic(config)# arp-to-host
sonic(config-arp-to-host)# convert enable vrf default
sonic(config-arp-to-host)# convert enable vrf 123

policy default_policy port vrf vrf_name {permit|deny|pass}

Section titled “policy default_policy port vrf vrf_name {permit|deny|pass}”

[Command]

policy default_policy port vrf vrf_name {permit|deny|pass}

[Purpose]

Configure ARP/ND-to-host default interface policy.

[Parameters]

ParameterDescription
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

ARP/ND-to-host Configuration View

[Notes]

Run command no policy default_policy port vrf vrf_name to delete ARP/ND-to-host default interface policy.

[Use Cases]

sonic# configure terminal
sonic(config)# arp-to-host
sonic(config-arp-to-host)# policy default_policy port vrf default permit
Section titled “policy port {ethernet|link-aggregation} interface_name {permit|deny|pass}”

[Command]

policy port {ethernet|link-aggregation} interface_name {permit|deny|pass}

[Purpose]

Configure an ARP/ND-to-host user-defined interface policy.

[Parameters]

ParameterDescription
interface_nameInterface name (eg.0/1)

[View]

ARP/ND-to-host Configuration View

[Notes]

Run command no policy port {ethernet|link-aggregation} interface_name to delete ARP/ND-to-host user-defined interface policy.

[Use Cases]

sonic# configure terminal
sonic(config)# arp-to-host
sonic(config-arp-to-host)# policy port ethernet 0/4 permit
sonic(config-arp-to-host)# policy port link-aggregation 4 deny

policy default_policy network vrf vrf_name {permit|deny}

Section titled “policy default_policy network vrf vrf_name {permit|deny}”

[Command]

policy default_policy network vrf vrf_name {permit|deny}

[Purpose]

Configure ARP/ND-to-host default segment policy.

[Parameters]

ParameterDescription
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

ARP/ND-to-host Configuration View

[Notes]

Run command no policy default_policy network vrf vrf_name to delete ARP/ND-to-host default segment policy.

[Use Cases]

sonic# configure terminal
sonic(config)# arp-to-host
sonic(config-arp-to-host)# policy default_policy network vrf default deny

policy network {A.B.C.D/M|X:X::X:X/M} vrf vrf_name {permit|deny}

Section titled “policy network {A.B.C.D/M|X:X::X:X/M} vrf vrf_name {permit|deny}”

[Command]

policy network {A.B.C.D/M|X:X::X:X/M} vrf vrf_name {permit|deny}

[Purpose]

Configure ARP/ND-to-host user-defined segment policy.

[Parameters]

ParameterDescription
A.B.C.D/MIPv4 address with prefix length.
X:X::X:X/MIPv6 address with prefix length.
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

ARP/ND-to-host Configuration View

[Notes]

Run command no policy default_policy network vrf vrf_name to delete ARP/ND-to-host user-defined segment policy.

[Use Cases]

sonic# configure terminal
sonic(config)# arp-to-host
sonic(config-arp-to-host)# policy network 10.179.238.64/26 vrf 123 deny

Table 7 ARP Proxy

CommandPurpose
arp proxy [mode {default|evpn}]Enable ARP proxy.
arp proxy extend requestEnable active detection for silent terminals.
arp proxy extend replyEnable learning of ARP Reply messages.

[Command]

arp proxy [mode {default|evpn}]

[Purpose]

Enable ARP proxy.

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

The mode can be default or evpn, and the default mode is default. Run command no arp proxy to disable ARP proxy.

[Use Cases]

sonic# configure terminal
sonic(config)# interface vlan 100
sonic(config-vlanif-100)# arp proxy
sonic(config-vlanif-100)# arp proxy mode evpn

[Command]

arp proxy extend request

[Purpose]

Enable active detection for silent terminals.

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

This feature is enabled when there are silent terminals (terminals which do not send ARP messages actively) in the Layer 2 network. Once enabled, when the switch receives an ARP request, it will send ARP request to probe if the target ip belongs to the same network segment. Run command no arp proxy extend request to disable this feature.

[Use Cases]

sonic# configure terminal
sonic(config)# interface 0/60
sonic(config)# interface ethernet 0/60
sonic(config-if-0/60)# arp proxy extend request
sonic(config-if-0/60)# no arp proxy extend request

[Command]

arp proxy extend reply

[Purpose]

Enable learning of ARP Reply messages.

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command no arp proxy extend reply to disable this feature.

[Use Cases]

sonic# configure terminal
sonic(config)# interface ethernet 0/60
sonic(config-if-0/60)# arp proxy extend reply
sonic(config-if-0/60)# no arp proxy extend reply

Table 8 ND Proxy

CommandPurpose
nd proxy mode defaultEnable ND proxy.

[Command]

nd proxy mode default

[Purpose]

Enable ND proxy.

[View]

Physical Interface / VLANIF / LAGIF Configuration View

[Notes]

Run command no nd proxy to disable ND proxy.

[Use Cases]

sonic# configure terminal
sonic(config)# interface vlan 100
sonic(config-vlanif-100)# nd proxy mode default

Table 9 Route View

CommandPurpose
show {ip|v6} route [summary|connected|static|bgp|ospf|isis|ip-address]Display IPv4/IPv6 route info.
show {ip|ipv6} protocolDisplay IPv4/IPv6 protocol info.
show pbr interface [ethernet interface_name|link-aggregation lag-id] [json]Display PBR binding info.
show pbr map[pbr-map-name|json|detail]Display PBR policy info.
show pbr nexthop-groups [next-group-name|json]Display PBR next-hop info.

show {ip|v6} route [summary|connected|static|bgp|ospf|isis|ip-address]

Section titled “show {ip|v6} route [summary|connected|static|bgp|ospf|isis|ip-address]”

[Command]

show {ip|ipv6} route [summary|connected|static|bgp|ospf|isis|ip-address]

[Purpose]

Display IPv4/IPv6 route info.

[Parameters]

ParameterDescription
ip-addressIPv4 or IPv6 address.

[View]

Privileged User View

[Use Cases]

sonic# show ip route connected
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
C>* 10.0.0.0/24 is directly connected, Ethernet112, 00:22:20
C>* 10.1.0.103/32 is directly connected, Loopback0, 20:16:20
C>* 10.250.0.0/24 is directly connected, eth0, 20:16:40
C>* 11.11.10.0/24 is directly connected, Vlan10, 20:16:10
C>* 112.0.0.0/24 is directly connected, Ethernet112, 00:22:20
C>* 122.0.0.0/24 is directly connected, Vlan100, 20:16:10

[Command]

show {ip|ipv6} protocol

[Purpose]

Display IPv4/IPv6 protocol info.

[View]

Privileged User View

[Use Cases]

sonic# show ip protocol
Protocol : route-map
------------------------
system : none
kernel : none
connected : none
static : none
rip : none
ripng : none
ospf : none
ospf6 : none
isis : none
bgp : RM_SET_SRC
pim : none
eigrp : none
nhrp : none
hsls : none
olsr : none
table : none
ldp : none
vnc : none
vnc-direct : none
vnc-rn : none
bgp-direct : none
bgp-direct-to-nve-groups : none
babel : none
sharp : none
pbr : none
bfd : none
wildcard : none
any : none
Section titled “show pbr interface [ethernet interface_name|link-aggregation lag-id] [json]”

[Command]

show pbr interface [ethernet interface_name|link-aggregation lag-id] [json]

[Purpose]

Display PBR binding info.

[Parameters]

ParameterDescription
interface_nameInterface name(eg.0/1)
lag-idLAG ID, the range is from 1 to 9999.

[View]

Privileged User View

[Use Cases]

sonic# show pbr interface ethernet 0/0
ethernet 0/0(15) with pbr-policy yd1

[Command]

show pbr map [pbr-map-name|json|detail]

[Purpose]

Display PBR policy info.

[Parameters]

ParameterDescription
pbr-map-namePBR map name.

[View]

Privileged User View

[Use Cases]

sonic# show pbr map yd1
pbr-map yd1 valid: yes
Seq: 1 rule: 300
Installed: yes Reason: Valid
SRC Match: 100.0.0.2/32
nexthop 102.0.0.2
Installed: yes Tableid: 10002

show pbr nexthop-groups [next-group-name|json]

Section titled “show pbr nexthop-groups [next-group-name|json]”

[Command]

show pbr nexthop-groups [next-group-name|json]

[Purpose]

Display PBR next-hop info.

[Parameters]

ParameterDescription
next-group-nameNext-hop group name.

[View]

Privileged User View

[Use Cases]

sonic# show pbr nexthop-groups yd
Nexthop-Group: yd Table: 10000 Valid: 1 Installed: 1
Valid: 1 nexthop 102.0.0.2
Valid: 1 nexthop 103.0.0.2

Table 10 Route Config

CommandPurpose
ip route A.B.C.D/M {A.B.C.D|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf]Configure IPv4 static routes.
ipv6 route X:X::X:X/M {X:X::X:X|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf]Configure IPv6 static routes.
pbr-map pbr-map-name seq seq-numCreate PBR policy and enter the PBR-map configuration view.
match {dst-ip dip|dst-port dport|ip-protocol ip-protocol|src-ip sip|src-port sport}Configure PBR policy match fields.
set {nexthop {A.B.C.D|X:X::X:X}|nexthop-group next-group-name}Configure PBR policy actions.
nexthop-group next-group-nameCreate a next-hop group and enter the next-hop group configuration mode.
nexthop {A.B.C.D|X:X::X:X}Configure the next hop.
pbr-policy pbr-map-nameBind PBR policy.

ip route A.B.C.D/M {A.B.C.D|interface-type interface-name} [distance][description description] [track track_id] [bfd] [nexthop-vrf vrf]

Section titled “ip route A.B.C.D/M {A.B.C.D|interface-type interface-name} [distance][description description] [track track_id] [bfd] [nexthop-vrf vrf]”

[Command]

ip route A.B.C.D/M {A.B.C.D|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf]

[Purpose]

Configure IPv4 static routes.

[Parameters]

ParameterDescription
A.B.C.D/MSpecify the destination network segment for routing.
A.B.C.DSpecify the IP address of next hop of the route.
interface-typeThe next-hop interface type. Optional parameters include ethernet, vlan, and link-aggregation.
interface-nameNext-hop interface name.
distanceStatic route distance value,range from 1-255. Default value: 1.
descriptionSpecify the description for the route. In string form.
track_idTrack ID, range from [1,4294967295].
bfdConfigure static route and BFD linkage.
vrfName of the VRF where the next-hop interface resides.

[View]

Global Configuration View / VRF Configuration View

[Notes]

Run command no ip route A.B.C.D/M {A.B.C.D|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf] to delete static routes configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# ip route 20.0.0.0/24 10.0.0.57 description test

ipv6 route X:X::X:X/M {X:X::X:X|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf]

Section titled “ipv6 route X:X::X:X/M {X:X::X:X|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf]”

[Command]

ipv6 route X:X::X:X/M {X:X::X:X|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf]

[Purpose]

Configure IPv6 static routes.

[Parameters]

ParameterDescription
X:X::X:X/MSpecify the destination network segment for routing.
X:X::X:XSpecify the IP address of next hop of the route.
interface-typeThe next-hop interface type. Optional parameters include ethernet, vlan, and link-aggregation.
interface-nameNext-hop interface name.
distanceStatic route distance value,range from 1-255. Default value: 1.
descriptionSpecify the description for the route. In string form.
track_idTrack ID, range from [1,4294967295].
bfdConfigure static route and BFD linkage.
vrfName of the VRF where the next-hop interface resides.

[View]

Global Configuration View / VRF Configuration View

[Notes]

Run command no ipv6 route X:X::X:X/M {X:X::X:X|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf] to delete static routes configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# ipv6 route 2001::2/96 2002::1 track 1

[Command]

pbr-map pbr-map-name seq seq-num

[Purpose]

Create PBR policy and enter the PBR-map configuration view.

[Parameters]

ParameterDescription
pbr-map-namePBR map name.
seq-numSequence number, range from 1 to 700.

[View]

Global Configuration View

[Notes]

Run command no pbr-map pbr-map-name [seq seq_num] to delete PBR policy configuration.

[Use Cases]

sonic(config)# pbr-map pbrmap1 seq 1
sonic(config-pbr-map)#

match { dst-ip dip|dst-port dport|ip-protocol ip-protocol|src-ip sip|src-port sport}

Section titled “match { dst-ip dip|dst-port dport|ip-protocol ip-protocol|src-ip sip|src-port sport}”

[Command]

match {dst-ip dip|dst-port dport|ip-protocol ip-protocol|src-ip sip|src-port sport}

[Purpose]

Configure PBR policy match fields.

[Parameters]

ParameterDescription
dipDestination IP, A.B.C.D/M or X:X::X:X/M.
dst-portDestination port number, range from 1 to 65535.
ip-protocolTCP/UDP.
sipSource IP, A.B.C.D/M or X:X::X:X/M.
sportSource port number, range from 1 to 65535.

[View]

PBR-map Configuration View

[Notes]

Run command no match {dst-ip dip|dst-port dport|ip-protocol ip-protocol|src-ip sip|src-port sport} to delete PBR policy match fields.

[Use Cases]

sonic(config)# pbr-map pbrmap1 seq 1
sonic(config-pbr-map)# match src-ip 1.2.1.1/32
sonic(config-pbr-map)#

set {nexthop {A.B.C.D|X:X::X:X}|nexthop-group next-group-name}

Section titled “set {nexthop {A.B.C.D|X:X::X:X}|nexthop-group next-group-name}”

[Command]

set {nexthop {A.B.C.D|X:X::X:X}|nexthop-group next-group-name}

[Purpose]

Configure PBR policy actions.

[Parameters]

ParameterDescription
A.B.C.D|X:X::X:XNext hop IP.
next-group-nameNexthop-group name.

[View]

PBR-map Configuration View

[Notes]

Run command no set {nexthop {A.B.C.D|X:X::X:X}|nexthop-group next-group-name} to delete PBR policy actions.

[Use Cases]

sonic(config)# pbr-map pbrmap1 seq 1
sonic(config-pbr-map)# set nexthop 83.0.0.1
sonic(config-pbr-map)#

[Command]

nexthop-group next-group-name

[Purpose]

Create a next-hop group and enter the next-hop group configuration mode.

[Parameters]

ParameterDescription
next-group-nameNexthop-group name.

[View]

Global Configuration View

[Notes]

Run command no nexthop-group next-group-name to delete the next-hop group configuration.

[Use Cases]

sonic(config)# nexthop-group nextgroup1
sonic(config-nh-group)#

[Command]

nexthop {A.B.C.D|X:X::X:X}

[Purpose]

Configure the next hop.

[Parameters]

ParameterDescription
A.B.C.D|X:X::X:XNext hop IP.

[View]

Nexthop-group Configuration View

[Notes]

Run command no nexthop {A.B.C.D|X:X::X:X} to delete the next hop configuration.

[Use Cases]

sonic(config)# nexthop-group nextgroup1
sonic(config-nh-group)# nexthop 82.0.0.1
sonic(config-nh-group)#

[Command]

pbr-policy pbr-map-name

[Purpose]

Bind PBR policy.

[Parameters]

ParameterDescription
pbr-map-namePBR map name.

[View]

Physical Interface/LAGIF Configuration View

[Notes]

Run command no pbr-policy pbr-map-name to delete binding PBR policy configuration.

[Use Cases]

sonic(config)# interface ethernet 0/0
sonic(config-if-0/0)# pbr-policy pbrmap1
sonic(config-if-0/0)#

Table 11 IP Prefix List View

CommandPurpose
show ip prefix-list [summary|detail|list_name]Display IP prefix list configuration.

show ip prefix-list [summary|detail|list_name]

Section titled “show ip prefix-list [summary|detail|list_name]”

[Command]

show ip prefix-list [summary|detail|list_name]

[Purpose]

Display IP prefix list configuration.

[Parameters]

ParameterDescription
list_nameSpecify the name of IP prefix list.

[View]

Privileged User View

[Use Cases]

sonic# show ip prefix-list list1
ZEBRA: ip prefix-list list1: 2 entries
seq 3 permit 10.0.0.0/24 ge 25 le 26
seq 4 permit 20.0.0.0/24 ge 25 le 26
OSPF: ip prefix-list list1: 2 entries
seq 3 permit 10.0.0.0/24 ge 25 le 26
seq 4 permit 20.0.0.0/24 ge 25 le 26
BGP: ip prefix-list list1: 2 entries
seq 3 permit 10.0.0.0/24 ge 25 le 26
seq 4 permit 20.0.0.0/24 ge 25 le 26
ISIS: ip prefix-list list1: 2 entries
seq 3 permit 10.0.0.0/24 ge 25 le 26
seq 4 permit 20.0.0.0/24 ge 25 le 26

Table 12 IP Prefix List Config

CommandPurpose
ip prefix-list list_name [seq sequence_number] {permit|deny} {any|A.B.C.D/M [ge ge|le le]}Add an IP prefix list.

ip prefix-list list_name [seq sequence_number] {permit|deny} {any|A.B.C.D/M [ge ge|le le]}

Section titled “ip prefix-list list_name [seq sequence_number] {permit|deny} {any|A.B.C.D/M [ge ge|le le]}”

[Command]

ip prefix-list list_name [seq sequence_number] {permit|deny} {any|A.B.C.D/M [ge ge|le le]}

[Purpose]

Add an IP prefix list for reference by ROUTE-MAP.

[Parameters]

ParameterDescription
list_nameSpecify the name of IP prefix list.
sequence_numberSpecify the sequence number.
A.B.C.D/MSpecifiy the network segment that this table entry matches.
geSpecify the minimum prefix length, and the range is from 0 to 32.
leSpecify the maximum prefix length, and the range is from 0 to 32.

[View]

Global Configuration View

[Notes]

The relationship between le, ge and length is: length <= ge <= le; Configuration of logically conflicting table entries within the same prefix list is not allowed. The list_name and sequence_number uniquely identify a table entry, and the IP prefix is not allowed to be the same between different table entries. Run command no ip prefix-list list_name [seq sequence_number] {permit|deny} {any|A.B.C.D/M [ge ge|le le]} to delete IP prefix list.

[Use Cases]

sonic# configure terminal
sonic(config)# ip prefix-list list1 seq 3 permit 10.0.0.0/24 le 26 ge 25

Table 13 VRF View

CommandPurpose
show vrf briefDisplay VRF configuration.
show vrf interfaceDisplay the binding relationship between VRFs and interfaces.
show interface mgmt vrfDisplay VRF configuration of management port.

[Command]

show vrf brief

[Purpose]

Display VRF configuration.

[View]

Privileged User View

[Use Cases]

sonic# show vrf brief
+------------+-------+-----------+
| vrf name | vni | src_mac |
+============+=======+===========+
| 100 | | |
+------------+-------+-----------+
| 101 | | |
+------------+-------+-----------+
| 200 | 2000 | |
+------------+-------+-----------+

[Command]

show vrf interface

[Purpose]

Display the binding relationship between VRFs and interfaces.

[View]

Privileged User View

[Use Cases]

sonic# show vrf interface
+------------+--------------+
| vrf name | interfaces |
+============+==============+
| 200 | vlan 227 |
| | vlan 237 |
+------------+--------------+
| 101 | loopback 1 |
+------------+--------------+

[Command]

show interface mgmt vrf

[Purpose]

Display VRF configuration of management port.

[View]

Privileged User View

[Use Cases]

sonic# show interface mgmt vrf
ManagementVRF : Disabled

Table 14 VRF Config

CommandPurpose
vrf mgmtSet the VRF of mgmt.
vrf vrf_name (Global Configuration View)Create a VRF.
vrf vrf_name (Interface View)Bind the interface to the VRF.
mac HH:HH:HH:HH:HH:HHConfigure the MAC address of VRF.
ip route A.B.C.D/M A.B.C.DAdd routes for VRFs.

[Command]

vrf mgmt

[Purpose]

Set the VRF of mgmt.

[View]

Management Port Configuration View

[Notes]

Run command no vrf mgmt to delete Management Interface VRF configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# interface mgmt 0
sonic(config-mgmt-0)# vrf mgmt

[Command]

vrf vrf_name

[Purpose]

Create a VRF.

[Parameters]

ParameterDescription
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

Global Configuration View

[Notes]

Run command no vrf vrf_name to delete VRF

[Use Cases]

sonic# configure terminal
sonic(config)# vrf 123

[Command]

vrf vrf_name

[Purpose]

Bind the interface to the VRF.

[Parameters]

ParameterDescription
vrf_nameSpecify the VRF name, the default VRF is default.

[View]

Physical Interface/VLANIF/LAGIF/Loopback Interface Configuration View

[Notes]

Loopback0 is not allowed to bind VRFs. Run command no vrf Unbind the interface from the VRF.

[Use Cases]

sonic# configure terminal
sonic(config)# interface loopback 1
sonic(config-loif-1)# vrf 123

[Command]

mac HH:HH:HH:HH:HH:HH

[Purpose]

Configure the MAC address of VRF.

[Parameters]

ParameterDescription
HH:HH:HH:HH:HH:HHMAC address.

[View]

VRF Configuration View

[Notes]

Run command no mac to delete VRF MAC address configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# vrf 123
sonic(config-vrf)# mac 00:a0:23:12:23:53

ip route A.B.C.D/M {A.B.C.D|interface-type interface-name} [distance][description description] [track track_id] [bfd] [nexthop-vrf vrf]

Section titled “ip route A.B.C.D/M {A.B.C.D|interface-type interface-name} [distance][description description] [track track_id] [bfd] [nexthop-vrf vrf]”

[Command]

ip route A.B.C.D/M {A.B.C.D|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf]

[Purpose]

Configure static routes for VRF.

[Parameters]

ParameterDescription
A.B.C.D/MSpecify the destination network segment for routing.
A.B.C.DSpecify the IP address of next hop of the route.
interface-typeThe next-hop interface type. Optional parameters include ethernet, vlan, and link-aggregation.
interface-nameNext-hop interface name.
distanceStatic route distance value,range from 1-255. Default value: 1.
descriptionSpecify the description for the route. In string form.
track_idTrack ID, range from [1,4294967295].
bfdConfigure static route and BFD linkage.
vrfName of the VRF where the next-hop interface resides.

[View]

VRF Configuration View

[Notes]

Run command no ip route A.B.C.D/M {A.B.C.D|interface-type interface-name}[distance][description description] [track track-id] [bfd] [nexthop-vrf vrf] to delete static routes configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# vrf 123
sonic(config-vrf)# ip route 10.0.0.0/24 20.0.0.2

Table 15 Route-Map View

CommandPurpose
show route-map [route-map|json]Display route map.

[Command]

show route-map [route-map|json]

[Purpose]

Display route map.

[Parameters]

ParameterDescription
route-mapRoute map name.

[View]

Privileged User View

[Use Cases]

sonic# show route-map
ZEBRA:
route-map: test Invoked: 0 Optimization: enabled Processed Change: false
permit, sequence 10 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
permit, sequence 1000 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
OSPF:
route-map: test Invoked: 0 Optimization: enabled Processed Change: false
permit, sequence 10 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
permit, sequence 1000 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
OSPF6:
route-map: test Invoked: 0 Optimization: enabled Processed Change: false
permit, sequence 10 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
permit, sequence 1000 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
BGP:
route-map: test Invoked: 0 Optimization: enabled Processed Change: false
permit, sequence 10 Invoked 0
Match clauses:
Set clauses:
as-path exclude 1 31
comm-list 1
Call clause:
Action:
Exit routemap
permit, sequence 1000 Invoked 0
Match clauses:
community 10
Set clauses:
as-path prepend 1 1
Call clause:
Action:
Exit routemap
ISIS:
route-map: test Invoked: 0 Optimization: enabled Processed Change: false
permit, sequence 10 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
permit, sequence 1000 Invoked 0
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap

Table 16 Route-Map Config

CommandPurpose
route-map route-map {permit|deny} seq-numCreate a route map and enter Route-map Configuration View.
description descriptionSpecify the description for the route-map.
matchas-path as_path_filter_nameMatch AS-path list.
match community {community_list_number|community_list_name} [exact-match]Match BGP community list.
match extcommunity {extcommunity_list_number|extcommunity_list_name}Match BGP/VPN extended community list.
match {ip|ipv6} address {prefix-len length|prefix-list list_name}Match address of route.
match {ip|ipv6} next-hop {prefix-len length|prefix-list list_name|address{A.B.C.D|X:X::X:X}|type blackhole}Match next-hop address of route.
match local-preference preference_valueMatch local-preference of route.
match metric metric_valueMatch metric of route.
match peer {A.B.C.D|X:X::X:X|interface_name}Match peer address.
set as-path prepend {as-path|last-as number}Prepend to the as-path.
set as-path exclude AS-numberExclude from the as-path.
setcommunity AA:NNSet BGP Community.
set community noneSet no BGP Community.
set distance distanceSet BGP Administrative Distance to use.
set extcommunitynoneSet no extended community attribute.
set extcommunity rt ASN:NN_OR_IP-ADDRESS:NNSet Route Target extended community.
set extcommunity soo ASN:NN_OR_IP-ADDRESS:NNSet Site-of-Origin extended community.
setip next-hop {A.B.C.D|peer-address}Set next-hop IP address.
set ipv6 next-hop {local X:X::X:X|global X:X::X:X|peer-address}Set next-hop IPv6 address.
set local-preference preference_valueSet local-preference of route.
set metric {metric_value|rtt|+rtt|-rtt}Set metric value.
set weight weightSet BGP weight for routing table.

[Command]

route-map route-map {permit|deny} seq-num

[Purpose]

Create a route map and enter Route-map Configuration View.

[Parameters]

ParameterDescription
route-mapRoute map name.
seq-numSequence number, the range is from 1 to 65535.

[View]

Global Configuration View

[Notes]

Run command no route-map route-map {permit|deny} seq_num to delete the route map.

[Use Cases]

sonic(config)# route-map test permit 100
sonic(config-route-map)#

[Command]

description description

[Purpose]

Specify the description for the route-map.

[Parameters]

ParameterDescription
descriptionIn string form.

[View]

Route-map Configuration View

[Notes]

Run command no description description to delete description.

[Use Cases]

sonic# configure terminal
sonic(config)# route-map test permit 1000
sonic(config)# description test

[Command]

match as-path as_path_filter_name

[Purpose]

Match AS-path list.

[Parameters]

ParameterDescription
as_path_filter_nameAS-path list.

[View]

Route-map Configuration View

[Notes]

Run command no match as-path as_path_filter_name to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match as-path test

match community {community_list_number|community_list_name} [exact-match]

Section titled “match community {community_list_number|community_list_name} [exact-match]”

[Command]

match community {community_list_number|community_list_name} [exact-match]

[Purpose]

Match BGP community list.

[Parameters]

ParameterDescription
community_list_numberCommunity-list number, range from 1 to 500. 1-99 as standard and 100-500 as expanded.
community_list_nameCommunity name.
exact-matchExact match.

[View]

Route-map Configuration View

[Notes]

Run command no match community {community_list_number|community_list_name} [exact-match] to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match community test

match extcommunity {extcommunity_list_number|extcommunity_list_name}

Section titled “match extcommunity {extcommunity_list_number|extcommunity_list_name}”

[Command]

match extcommunity {extcommunity_list_number|extcommunity_list_name}

[Purpose]

Match BGP/VPN extended community list.

[Parameters]

ParameterDescription
extcommunity_list_numberCommunity-list number, range from 1 to 500. 1-99 as standard and 100-500 as expanded.
extcommunity_list_nameSpecify extcommunity-list.

[View]

Route-map Configuration View

[Notes]

Run command nomatch extcommunity {extcommunity_list_number|extcommunity_list_name} to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match extcommunity 100

match {ip|ipv6} address {prefix-len length|prefix-list list_name}

Section titled “match {ip|ipv6} address {prefix-len length|prefix-list list_name}”

[Command]

match {ip|ipv6} address {prefix-len length|prefix-list list_name}

[Purpose]

Match address of route.

[Parameters]

ParameterDescription
lengthIP address length.
list_nameSpecify the name of IP prefix list.

[View]

Route-map Configuration View

[Notes]

Run command no match {ip|ipv6} address {prefix-len length|prefix-list list_name} to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match ip address prefix-list test

match {ip|ipv6} next-hop {prefix-len length|prefix-list list_name|address{A.B.C.D|X:X::X:X}|type blackhole}

Section titled “match {ip|ipv6} next-hop {prefix-len length|prefix-list list_name|address{A.B.C.D|X:X::X:X}|type blackhole}”

[Command]

match {ip|ipv6} next-hop {prefix-len length|prefix-list list_name|address {A.B.C.D|X:X::X:X}|type blackhole}

[Purpose]

Match next-hop address of route.

[Parameters]

ParameterDescription
lengthIP address length.
list_nameSpecify the name of IP prefix list.
A.B.C.DIPv4 address
X:X::X:XIPv6 address

[View]

Route-map Configuration View

[Notes]

Run command no match {ip|ipv6} next-hop {prefix-len length|prefix-list list_name|address {A.B.C.D|X:X::X:X}|typeblackhole} to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match ip next-hop type blackhole

[Command]

match local-preference preference_value

[Purpose]

Match local-preference of route.

[Parameters]

ParameterDescription
preference_valueRoute preference, range from 0 to 4294967295.

[View]

Route-map Configuration View

[Notes]

Run command nomatch local-preference preference_value to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match local-preference 12

[Command]

match metric metric_value

[Purpose]

Match metric of route.

[Parameters]

ParameterDescription
metric_valueRoute metric, range from 0 to 4294967295.

[View]

Route-map Configuration View

[Notes]

Run command no match metric metric_value to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match metric 12

match peer {A.B.C.D|X:X::X:X|interface_name}

Section titled “match peer {A.B.C.D|X:X::X:X|interface_name}”

[Command]

match peer {A.B.C.D|X:X::X:X|interface_name}

[Purpose]

Match peer address.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address
X:X::X:XIPv6 address
interface_nameinterface name

[View]

Route-map Configuration View

[Notes]

Run command no match peer {A.B.C.D|X:X::X:X|interface_name} to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# match peer 1.1.1.1

set as-path prepend {as-path|last-as number}

Section titled “set as-path prepend {as-path|last-as number}”

[Command]

set as-path prepend {as-path|last-as number}

[Purpose]

Prepend to the as-path.

[Parameters]

ParameterDescription
as-pathAS number, range from 1 to 4294967295. Specify multiple AS numbers separated by spaces.
last-as numberUse the last AS-number in the as-path. The number range is 1~10.

[View]

Route-map Configuration View

[Notes]

set as-path prepend {as-path|last-as number} to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set as-path prepend 100 200

[Command]

set as-path exclude AS-number

[Purpose]

Exclude from the as-path.

[Parameters]

ParameterDescription
AS-numberAS number, range from 1 to 4294967295. Specify multiple AS numbers separated by spaces.

[View]

Route-map Configuration View

[Notes]

Run command no set as-path exclude AS-number to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set as-path exclude 12

[Command]

set community AA:NN

[Purpose]

Set BGP Community.

[Parameters]

ParameterDescription
AA:NN|Community number in AA:NN format (where AA and NN are (0-65535)) or local-AS|no-advertise|no-export|internet|graceful-shutdown|accept-own-nexthop|accept-own|route-filter-translated-v4|route-filter-v4|route-filter-translated-v6|route-filter-v6|llgr-stale|no-llgr|blackholeno-peer or additive

[View]

Route-map Configuration View

[Notes]

Run command no set community AA:NN to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set community 12

[Command]

set communitynone

[Purpose]

Set no BGP Community.

[View]

Route-map Configuration View

[Notes]

Run command no set community to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set community none

[Command]

set distance distance

[Purpose]

Set BGP Administrative Distance to use.

[Parameters]

ParameterDescription
distanceRange from 0 to 255.

[View]

Route-map Configuration View

[Notes]

Run command no set distance distance to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set distance 12

[Command]

set extcommunitynone

[Purpose]

Set no extended community attribute.

[View]

Route-map Configuration View

[Notes]

Run command no set extcommunity to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set extcommunity none

set extcommunity rt ASN:NN_OR_IP-ADDRESS:NN

Section titled “set extcommunity rt ASN:NN_OR_IP-ADDRESS:NN”

[Command]

set extcommunity rt ASN:NN_OR_IP-ADDRESS:NN

[Purpose]

Set Route Target extended community.

[Parameters]

ParameterDescription
ASN:NN_OR_IP-ADDRESS:NNVPN extended community. When specifying more than one, separate them with a space.

[View]

Route-map Configuration View

[Notes]

Run command no set extcommunity rt ASN:NN_OR_IP-ADDRESS:NN to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set extcommunity rt 100:1:2

set extcommunity soo ASN:NN_OR_IP-ADDRESS:NN

Section titled “set extcommunity soo ASN:NN_OR_IP-ADDRESS:NN”

[Command]

set extcommunity soo ASN:NN_OR_IP-ADDRESS:NN

[Purpose]

Set Site-of-Origin extended community.

[Parameters]

ParameterDescription
ASN:NN_OR_IP-ADDRESS:NNVPN extended community. When specifying more than one, separate them with a space.

[View]

Route-map Configuration View

[Notes]

Run command no set extcommunity soo ASN:NN_OR_IP-ADDRESS:NN to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set extcommunity soo 100:1:2

[Command]

set ip next-hop {A.B.C.D|peer-address}

[Purpose]

Set next-hop IP address.

[Parameters]

ParameterDescription
A.B.C.DIPv4 address.
peer-addressUse peer address (for BGP only)

[View]

Route-map Configuration View

[Notes]

Run command no set ip next-hop A.B.C.D to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set ip next-hop 1.1.1.1

set ipv6 next-hop {local X:X::X:X|global X:X::X:X|peer-address}

Section titled “set ipv6 next-hop {local X:X::X:X|global X:X::X:X|peer-address}”

[Command]

set ipv6 next-hop {local X:X::X:X|global X:X::X:X|peer-address}

[Purpose]

Set next-hop IPv6 address.

[Parameters]

ParameterDescription
local X:X::X:XIPv6 local address.
global X:X::X:XIPv6 global address.
peer-addressUse peer address (for BGP only)

[View]

Route-map Configuration View

[Notes]

Run command no set ipv6 next-hop local X:X::X:X to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set ipv6 next-hop local 100::1

[Command]

set local-preference preference_value

[Purpose]

Set local-preference of route.

[Parameters]

ParameterDescription
preference_valuePreference value (0-4294967295)

[View]

Route-map Configuration View

[Notes]

Run command no set local-preference preference_value to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set local-preference 12

[Command]

set metric {metric_value|rtt|+rtt|-rtt}

[Purpose]

Set metric value.

[Parameters]

ParameterDescription
metric_valueMetric value (use +/- for additions or subtractions) (-4294967295-4294967295).
rttAssign round trip time.
+rttAdd round trip time.
-rttSubtract round trip time.

[View]

Route-map Configuration View

[Notes]

Run command no set metric {metric_value|rtt|+rtt|-rtt } to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set metric 12

[Command]

set weight weight

[Purpose]

Set BGP weight for routing table.

[Parameters]

ParameterDescription
weightWeight value, range from 0 to 4294967295.

[View]

Route-map Configuration View

[Notes]

Run command no set weight weight to delete the configuration.

[Use Cases]

sonic(config)# route-map test permit 1000
sonic(config-route-map)# set weight 12

Table 17 SLA View

CommandPurpose
show sla summaryDisplay SLA configuration.

[Command]

show sla summary

[Purpose]

Display SLA configuration.

[View]

Privileged User View

[Use Cases]

sonic# show sla summary
===================================icmp_echo====================================
Sla-id type dst_ip min_time avg_time max_time packt_loss
-------- ------ -------- ---------- ---------- ---------- ------------
==================================user_define===================================
Sla-id type user_args customer_file_path
-------- ------ ----------- --------------------

Table 18 SLA Config

CommandPurpose
sla sla-id icmp_echo dst_ipCreate an ICMP Echo mode SLA instance.
sla sla-id user_define [String]Create a user-defined SLA instance.
set src_port {ethernet interface_name |link-aggregation interface_name|vlan vlan-id}Set the source interface for the detection.
set interval intervalSet the detection interval.
set timeout timeoutSet the timeout of the detection.
set dst_ip dst_ipSet the destination IP for the detection.

[Command]

sla sla-id icmp_echo dst_ip

[Purpose]

Create an ICMP Echo mode SLA instance.

[Parameters]

ParameterDescription
sla-idSLA ID, range from [1,4294967295].
dst_ipSpecify the destination IP for detection, IPv4 or IPv6, in the format of A.B.C.D or A::B.

[View]

Global Configuration View

[Notes]

Run command no sla sla-id to delete SLA instance.

[Use Cases]

sonic(config)# sla 2 icmp_echo 10.0.0.1
sonic(config-sla-icmp_echo)#

[Command]

sla sla-id user_define [String]

[Purpose]

Create a user-defined SLA instance.

[Parameters]

ParameterDescription
sla-idSLA ID, range from [1,4294967295].
StringSpecify the path of monitoring file, the default path is /var/run/sla-user-define/sla_user_define_default.

[View]

Global Configuration View

[Notes]

Run command no sla sla-id to delete SLA instance.

[Use Cases]

sonic(config)# sla 2 user_define
sonic(config-sla-user_define)#
Section titled “set src_port {ethernet interface_name |link-aggregation interface_name|vlan vlan-id}”

[Command]

set src_port {ethernet interface_name |link-aggregation interface_name|vlan vlan-id}

[Purpose]

Set the source interface for the detection.

[Parameters]

ParameterDescription
interface_nameInterface name(eg.0/1)
vlan-idVLAN ID, the range is [1,4094].

[View]

ICMP Echo Mode SLA Configuration View

[Notes]

Run command no set src_port {ethernet interface_name |link-aggregation interface_name|vlan vlan-id} to delete the source interface.

[Use Cases]

sonic(config-sla-icmp_echo)# set src_port ethernet 0/0
sonic(config-sla-icmp_echo)#

[Command]

set interval interval

[Purpose]

Set the detection interval.

[Parameters]

ParameterDescription
intervalSpecify the detection interval in seconds, the range is [1,300].

[View]

ICMP Echo Mode SLA Configuration View

[Notes]

Run command no set interval to delete the detection configuration.

[Use Cases]

sonic(config-sla-icmp_echo)# set interval 1

[Command]

set timeout timeout

[Purpose]

Set the timeout of the detection.

[Parameters]

ParameterDescription
timeoutSpecify the timeout in seconds, in the range [1,300].

[View]

ICMP Echo Mode SLA Configuration View

[Notes]

Run command no set timeout timeout to delete the timeout configuration.

[Use Cases]

sonic(config-sla-icmp_echo)# set timeout 1

[Command]

set dst_ip dst_ip

[Purpose]

Set the destination IP for the detection.

[Parameters]

ParameterDescription
dst_ipSpecify the destination IP for detection, IPv4 or IPv6, in the format A.B.C.D or A::B.

[View]

User-defined SLA Configuration View

[Notes]

Run command no set dst_ip to delete the destination IP for the detection.

[Use Cases]

sonic(config-sla-user_define)# set dst_ip 10.0.0.1

Table 19 Track View

CommandPurpose
show track summaryDisplay track configuration.

[Command]

show track summary

[Purpose]

Display track configuration.

[View]

Privileged User View

[Use Cases]

sonic# show track summary
Track_id bind_sla-id state
---------- ------------- -------

Table 20 Track Config

CommandPurpose
track track_id sla sla_idCreate a track instance and bind the SLA instance.

[Command]

track track_id sla sla_id

[Purpose]

Create a track instance and bind the SLA instance.

[Parameters]

ParameterDescription
track_idTrack ID, range from [1,4294967295]
sla_idSLA ID, range from [1,4294967295]

[View]

Global Configuration View

[Notes]

Run command no track track_id to delete the track instance.

[Use Cases]

sonic(config)# track 1 sla 1

Table 21 SLAAC View

CommandPurpose
show radvDisplay RA configuration

[Command]

show radv

[Purpose]

Display RA configuration

[View]

Privileged User View

[Use Cases]

sonic# show radv
Enabled: true
Global unicast only: false
+-------------+---------------+----------------+--------------------+-----------+-----------------+------------+---------+-------------------------+
| Interface | Prefix | Managed_Flag | Otherconfig_Flag | OffLink | No-autonomous | Link_MTU | RDNSS | Route | Preference |
+=============+===============+================+====================+===========+=================+============+=========+=========================+
| vlan11 | | on | | | | | | |
+-------------+---------------+----------------+--------------------+-----------+-----------------+------------+---------+-------------------------+
| 0/52 | 2000:101::/64 | on | on | on | on | 1900 | 2000::1 | 2000:101::10/128 | high |
+-------------+---------------+----------------+--------------------+-----------+-----------------+------------+---------+-------------------------+

Table 22 SLAAC Config

CommandPurpose
radv enableEnable RA notification.
radv dns-server X:X::X:XConfigure DNS information for RA notification.
radv link-mtu mtuConfigure the MTU of the link for RA notification.
radv prefix X:X::X:X/MConfigure prefix information for RA notification.
radv route-information X:X::X:X/M [preference {low|high|medium}]Configure route information for RA notification.
radv managed-flagSet the managed-flag to on.
radv other-config-flagSet the other-config-flag to on.
radv offlinkSet the flag of on-link to off.
radv no-autonomousSet the flag of autonomous to off.
radv ra-interval MaxRtrAdvInterval MinRtrAdvIntervalConfigure the maximum and minimum time interval between two RA notifications

[Command]

radv enable

[Purpose]

Enable RA notification.

[View]

Global Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv enable to disable RA notification.

[Use Cases]

sonic# configure
sonic(config)# radv enable
Please enter 'radv commit' to take effect
sonic(config)# radv commit

[Command]

radv dns-server X:X::X:X

[Purpose]

Configure DNS information for RA notification.

[Parameters]

ParameterDescription
X:X::X:XIPv6 address of DNS server

[View]

Physical Interface / Sub-interface/ VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv dns-server X:X::X:X to remove the configuration.

[Use Cases]

sonic# configure
sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv dns-server 2002::2
Please enter 'radv commit' to take effect
sonic(config-if-0/52)# radv commit

[Command]

radv link-mtu mtu

[Purpose]

Configure the MTU of the link for RA notification

[Parameters]

ParameterDescription
mtuSet link-mtu, the default value is 9216.

[View]

Physical Interface / Sub-interface/ VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv link-mtu to remove the configuration.

[Use Cases]

sonic# configure
sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv link-mtu 1500
Please enter 'radv commit' to take effect
sonic (config-if-0/52)# radv commit
sonic(config-if-0/52)#

[Command]

radv prefix X:X::X:X/M

[Purpose]

Configure prefix information for RA notification.

[Parameters]

ParameterDescription
X:X::X:X/MNetwork prefix for RA notifications

[View]

Physical Interface / Sub-interface/ VLANIF / LAGIF Configuration View

[Notes]

When RA notification is enabled, you are required to set the prefix information, or the interface will not send RA messages. Run command radv commit to take effect. Run command no radv prefix X:X::X:X/M to remove the configuration.

[Use Cases]

sonic# configure
sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv prefix 3001::/64
Please enter 'radv commit' to take effect
sonic(config-if-0/52)# radv commit

radv route-information X:X::X:X/M [preference {low|high|medium}]

Section titled “radv route-information X:X::X:X/M [preference {low|high|medium}]”

[Command]

radv route-information X:X::X:X/M [preference {low|high|medium}]

[Purpose]

Configure route information for RA notification

[Parameters]

ParameterDescription
X:X::X:X/M|The network segment of RA’s routing announcement

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect Run command no radv route-information X:X::X:X/M to remove the configuration.

[Use Cases]

sonic# configure
sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv route-information 3001:1::/64 preference low
Please enter 'radv commit' to take effect
sonic(config-if-0/52)# radv commit

[Command]

radv managed-flag

[Purpose]

Set the managed-flag to on(default is off)

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv managed-flag to revert it to off.

[Use Cases]

sonic# configure
sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv managed-flag
Please enter 'radv commit' to take effect
sonic(config-if-0/52)# radv commit

[Command]

radv other-config-flag

[Purpose]

Set the other-config-flag to on (default is off).

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv other-config-flag to revert it to off.

[Use Cases]

sonic# configure
sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv other-config-flag
Please enter 'radv commit' to take effect
sonic(config-if-0/52)# radv commit

[Command]

radv offlink

[Purpose]

Set the flag of on-link to off (default is on).

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv offlink to revert it to on.

[Use Cases]

sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv offlink
Please enter 'radv commit' to take effect
sonic(config-if-0/52)# radv commit

[Command]

radv no-autonomous

[Purpose]

Set the flag of autonomous to off (default is on).

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv no-autonomous to revert it to on.

[Use Cases]

sonic(config)# interface ethernet 0/52
sonic(config-if-0/52)# radv no-autonomous
Please enter 'radv commit' to take effect
sonic(config-if-0/52)# radv commit

radv ra-interval MaxRtrAdvInterval MinRtrAdvInterval

Section titled “radv ra-interval MaxRtrAdvInterval MinRtrAdvInterval”

[Command]

radv ra-interval MaxRtrAdvInterval MinRtrAdvInterval

[Purpose]

Configure the maximum and minimum time interval between two RA notifications.

[Parameters]

ParameterDescription
MaxRtrAdvIntervalthe maximum time interval for RA notifications ,default value is 600,unit: seconds
MinRtrAdvIntervalthe minimum time interval for RA notifications ,default value is 600,unit: seconds

[View]

Physical Interface / Sub-interface / VLANIF / LAGIF Configuration View

[Notes]

Run command radv commit to take effect. Run command no radv ra-interval to set back to default value.

[Use Cases]

sonic# configure
sonic(config)# interface ethernet 0/40
sonic(config-if-0/40)# radv ra-interval 50 25
Please enter 'radv commit' to take effect
sonic(config-if-0/40)# radv commit

Table 23 Hash config

CommandPurpose
hash seed valueSet hash seed.
hash enhancementEnable Hash Enhancement
hash mode {ipv4|ipv6|non_ip|ipv4-rdma|ipv6-rdma} hash_keySet load-balance mode and hash key.

[Command]

hash seed value

[Purpose]

Set hash seed.

[Parameters]

ParameterDescription
valueThe range is 0~4294967295.

[View]

Global Configuration View

[Notes]

Configure this parameter to modify the LAG and ECMP hash seed. Run command no hash seed to restore to default value 10.

[Use Cases]

sonic# configure terminal
sonic(config)# hash seed 1000

[Command]

hash enhancement

[Purpose]

Enable Hash Enhancements.

[View]

Global Configuration View

[Notes]

Configure this parameter to automatically modify the hash Seed of LAG and ECMP, eliminating ECMP polarization phenomenon. Run command hash enhancement to disable hash enhancement.

[Use Cases]

sonic# configure terminal
sonic(config)# hash enhancement

hash mode {ipv4|ipv6|non_ip|ipv4-rdma|ipv6-rdma} hash_key

Section titled “hash mode {ipv4|ipv6|non_ip|ipv4-rdma|ipv6-rdma} hash_key”

[Command]

hash mode {ipv4|ipv6|non-ip|ipv4-rdma|ipv6-rdma} hash_key

[Purpose]

Set load-balance and hash key.

[Parameters]

ParameterDescription
hash_key

The configurable hash key varys in different modes.

Keys vlan_id/ip-protocol/src-ip/dst-ip/l4-src-port/l4-dst-port/in-port are supported for type IPv4.

Keys vlan-id/src-ipv6/dst-ipv6/l4-src-port/l4-dst-port/in-port/nextheader/flow-label are supported for type IPv6.

Keys src-mac/dst-mac/ethertype/vlan-id/in-port are supported for NON-IP type.

Keys vlan_id/ip-protocol/src-ip/dst-ip/l4-src-port/l4-dst-port/in-port/bth-dest-qp supported for ipv4-rdma type.

Keys vlan-id/src-ipv6/dst-ipv6/l4-src-port/l4-dst-port/in-port/nextheader/ flow-label/bth-dest-qp supported for ipv6-rdma type.

[View]

Global Configuration View

[Notes]

Set this parameter to modify the LAG and ECMP hash key. CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2 devices currently do not support configuring flow label fields for ipv6 types, which is enabled by default. Only CX864E-N device currently supports ipv4-rdma and ipv6-rdma type. Run command no hash mode {ipv4|ipv6|non-ip|ipv4-rdma|ipv6-rdma} to delete the configured custom load balancing and restore it to the default configuration.

[Use Cases]

sonic# configure terminal
sonic(config)# hash mode ipv4 src-ip dst-ip
sonic(config)# hash mode ipv6 src-ipv6 nextheader in-port
sonic(config)# hash mode non-ip src-mac dst-mac vlan-id