Layer 3 Configuration
ARP View
Section titled “ARP View”Table 1 ARP View
Command | Purpose |
---|---|
show arp | Display ARP table entries. |
clear neighbor all | Clear all ARP table entries. |
clear neighbor interface {ethernet|link-aggregation|vlan} {interface_name[.subinterface-number]} | Delete the specified ARP table entries. |
show arp
Section titled “show arp”[Command]
show arp
[Purpose]
Display ARP table entries.
[View]
Privileged User View
[Use Cases]
sonic# show arpAddress MacAddress Iface Vlan------------ ----------------- ----------- ------10.10.200.2 18:17:25:37:67:3e - 200Total number of entries 1
clear neighbor all
Section titled “clear neighbor all”[Command]
clear neighbor all
[Purpose]
Clear all ARP table entries.
[View]
Privileged User View
[Use Cases]
sonic# clear neighbor all
clear neighbor interface {ethernet|link-aggregation|vlan} {interface_name[.subinterface-number]}
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]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
subinterface-number | Subinterface number. |
[View]
Privileged User View
[Use Cases]
sonic# clear neighbor interface ethernet 0/2
ARP Config
Section titled “ARP Config”Table 2 ARP Config
Command | Purpose |
---|---|
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-time | Configure ARP aging time. |
arp probe interval time | Configure ARP probe interval. |
arp probe times probe-times | Configure ARP probe times. |
arp static A.B.C.D HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name[.subinterface-number]
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]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address |
HH:HH:HH:HH:HH:HH | MAC address. |
interface_name | Interface name (eg.0/1) |
subinterface-number | Subinterface 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 terminalsonic(config)# arp static 3.3.3.3 00:00:00:00:00:01 interface vlan 5sonic(config)# arp static 4.4.4.4 00:00:00:00:00:02 interface ethernet 0/1sonic(config)# arp static 5.5.5.5 00:00:00:00:00:03 interface link-aggregation 1
arp timeout aging-time
Section titled “arp timeout aging-time”[Command]
arp timeout aging-time
[Purpose]
Configure ARP aging time.
[Parameters]
Parameter | Description |
---|---|
aging-time | Specify 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 terminalsonic(config)# arp timeout 500sonic(config)# interface vlan 100sonic(config-vlanif-100)# arp timeout 8500
arp probe interval time
Section titled “arp probe interval time”[Command]
arp probe interval time
[Purpose]
Configure ARP probe interval.
[Parameters]
Parameter | Description |
---|---|
time | Specify 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 terminalsonic(config)# arp probe interval 10sonic(config)# interface ethernet 0/80sonic(config-if-0/80)# arp probe interval 5sonic(config-if-0/80)# no arp probe interval
arp probe times probe-times
Section titled “arp probe times probe-times”[Command]
arp probe times probe-times
[Purpose]
Configure ARP probe times.
[Parameters]
Parameter | Description |
---|---|
probe-times | Specify 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 terminalsonic(config)# arp probe times 10sonic(config)# interface ethernet 0/80sonic(config-if-0/80)# arp probe times 14sonic(config-if-0/80)# no arp probe times
NDP view
Section titled “NDP view”Table 3 NDP View
Command | Purpose |
---|---|
show ndp | Display NDP table. |
show ndp
Section titled “show ndp”[Command]
show ndp
[Purpose]
Display NDP table.
[View]
Privileged User View
[Use Cases]
sonic# show ndpAddress MacAddress Iface Vlan Status--------- ----------------- ---------- ------ ---------2023::2 00:00:01:00:00:01 0/24 - PERMANENTTotal number of entries 1
NDP Config
Section titled “NDP Config”Table 4 NDP Config
Command | Purpose |
---|---|
ndp static A::B HH:HH:HH:HH:HH:HH interface{ethernet|link-aggregation|vlan} interface_name | Configure static NDP table entries. |
ndp static A::B HH:HH:HH:HH:HH:HH interface {ethernet|link-aggregation|vlan} interface_name
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]
Parameter | Description |
---|---|
A::B | IPv6 address. |
HH:HH:HH:HH:HH:HH | MAC address. |
interface_name | Interface 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 terminalsonic(config)# ndp static 2023::2 00:00:01:00:00:01 interface ethernet 0/24
ARP/ND to host
Section titled “ARP/ND to host”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.
ARP/ND to host View
Section titled “ARP/ND to host View”Table 5 ARP/ND to Host View
Command | Purpose |
---|---|
show arp-to-host summary | Display ARP/ND to Host summary info. |
show arp-to-host policy | Display ARP/ND to Host policy configuration. |
show arp-to-host summary
Section titled “show arp-to-host summary”[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 summaryVrf name Convert Fast convergence Metric---------- --------- ------------------ --------default enable disable 5200
show arp-to-host policy
Section titled “show arp-to-host policy”[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 policyPort:Port Policy---------- --------0/56 permitNetwork:Vrf name Network Policy---------- ---------- --------default 1.1.1.1/24 permit
ARP/ND to host Config
Section titled “ARP/ND to host Config”Table 6 ARP to Host Config
Command | Purpose |
---|---|
arp-to-host | Enter ARP/ND to host Configuration View |
convert enablevrf vrf_name | Enable 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. |
arp-to-host
Section titled “arp-to-host”[Command]
arp-to-host
[Purpose]
Enter ARP/ND-to-host Configuration View
[View]
Global Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# arp-to-hostsonic(config-arp-to-host)# convert enable vrf default
convert enable vrf vrf_name
Section titled “convert enable vrf vrf_name”[Command]
convert enable vrf vrf_name
[Purpose]
Enable ARP/ND-to-host for specified VRFs.
[Parameters]
Parameter | Description |
---|---|
vrf_name | Specify 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 terminalsonic(config)# arp-to-hostsonic(config-arp-to-host)# convert enable vrf defaultsonic(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]
Parameter | Description |
---|---|
vrf_name | Specify 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 terminalsonic(config)# arp-to-hostsonic(config-arp-to-host)# policy default_policy port vrf default permit
policy port {ethernet|link-aggregation} interface_name {permit|deny|pass}
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]
Parameter | Description |
---|---|
interface_name | Interface 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 terminalsonic(config)# arp-to-hostsonic(config-arp-to-host)# policy port ethernet 0/4 permitsonic(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]
Parameter | Description |
---|---|
vrf_name | Specify 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 terminalsonic(config)# arp-to-hostsonic(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]
Parameter | Description |
---|---|
A.B.C.D/M | IPv4 address with prefix length. |
X:X::X:X/M | IPv6 address with prefix length. |
vrf_name | Specify 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 terminalsonic(config)# arp-to-hostsonic(config-arp-to-host)# policy network 10.179.238.64/26 vrf 123 deny
ARP Proxy
Section titled “ARP Proxy”Table 7 ARP Proxy
Command | Purpose |
---|---|
arp proxy [mode {default|evpn}] | Enable ARP proxy. |
arp proxy extend request | Enable active detection for silent terminals. |
arp proxy extend reply | Enable learning of ARP Reply messages. |
arp proxy [mode {default|evpn}]
Section titled “arp proxy [mode {default|evpn}]”[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 terminalsonic(config)# interface vlan 100sonic(config-vlanif-100)# arp proxysonic(config-vlanif-100)# arp proxy mode evpn
arp proxy extend request
Section titled “arp proxy extend request”[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 terminalsonic(config)# interface 0/60sonic(config)# interface ethernet 0/60sonic(config-if-0/60)# arp proxy extend requestsonic(config-if-0/60)# no arp proxy extend request
arp proxy extend reply
Section titled “arp proxy extend reply”[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 terminalsonic(config)# interface ethernet 0/60sonic(config-if-0/60)# arp proxy extend replysonic(config-if-0/60)# no arp proxy extend reply
ND Proxy
Section titled “ND Proxy”Table 8 ND Proxy
Command | Purpose |
---|---|
nd proxy mode default | Enable ND proxy. |
nd proxy mode default
Section titled “nd proxy mode default”[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 terminalsonic(config)# interface vlan 100sonic(config-vlanif-100)# nd proxy mode default
Route View
Section titled “Route View”Table 9 Route View
Command | Purpose |
---|---|
show {ip|v6} route [summary|connected|static|bgp|ospf|isis|ip-address] | Display IPv4/IPv6 route info. |
show {ip|ipv6} protocol | Display 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]
Parameter | Description |
---|---|
ip-address | IPv4 or IPv6 address. |
[View]
Privileged User View
[Use Cases]
sonic# show ip route connectedCodes: 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 - backupC>* 10.0.0.0/24 is directly connected, Ethernet112, 00:22:20C>* 10.1.0.103/32 is directly connected, Loopback0, 20:16:20C>* 10.250.0.0/24 is directly connected, eth0, 20:16:40C>* 11.11.10.0/24 is directly connected, Vlan10, 20:16:10C>* 112.0.0.0/24 is directly connected, Ethernet112, 00:22:20C>* 122.0.0.0/24 is directly connected, Vlan100, 20:16:10
show {ip|ipv6} protocol
Section titled “show {ip|ipv6} protocol”[Command]
show {ip|ipv6} protocol
[Purpose]
Display IPv4/IPv6 protocol info.
[View]
Privileged User View
[Use Cases]
sonic# show ip protocolProtocol : route-map------------------------system : nonekernel : noneconnected : nonestatic : nonerip : noneripng : noneospf : noneospf6 : noneisis : nonebgp : RM_SET_SRCpim : noneeigrp : nonenhrp : nonehsls : noneolsr : nonetable : noneldp : nonevnc : nonevnc-direct : nonevnc-rn : nonebgp-direct : nonebgp-direct-to-nve-groups : nonebabel : nonesharp : nonepbr : nonebfd : nonewildcard : noneany : none
show pbr interface [ethernet interface_name|link-aggregation lag-id] [json]
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]
Parameter | Description |
---|---|
interface_name | Interface name(eg.0/1) |
lag-id | LAG 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
show pbr map [pbr-map-name|json|detail]
Section titled “show pbr map [pbr-map-name|json|detail]”[Command]
show pbr map [pbr-map-name|json|detail]
[Purpose]
Display PBR policy info.
[Parameters]
Parameter | Description |
---|---|
pbr-map-name | PBR 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]
Parameter | Description |
---|---|
next-group-name | Next-hop group name. |
[View]
Privileged User View
[Use Cases]
sonic# show pbr nexthop-groups ydNexthop-Group: yd Table: 10000 Valid: 1 Installed: 1 Valid: 1 nexthop 102.0.0.2 Valid: 1 nexthop 103.0.0.2
Route Config
Section titled “Route Config”Table 10 Route Config
Command | Purpose |
---|---|
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-num | Create 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-name | Create 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-name | Bind 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]
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. |
interface-type | The next-hop interface type. Optional parameters include ethernet, vlan, and link-aggregation. |
interface-name | Next-hop interface name. |
distance | Static route distance value,range from 1-255. Default value: 1. |
description | Specify the description for the route. In string form. |
track_id | Track ID, range from [1,4294967295]. |
bfd | Configure static route and BFD linkage. |
vrf | Name 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 terminalsonic(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]
Parameter | Description |
---|---|
X:X::X:X/M | Specify the destination network segment for routing. |
X:X::X:X | Specify the IP address of next hop of the route. |
interface-type | The next-hop interface type. Optional parameters include ethernet, vlan, and link-aggregation. |
interface-name | Next-hop interface name. |
distance | Static route distance value,range from 1-255. Default value: 1. |
description | Specify the description for the route. In string form. |
track_id | Track ID, range from [1,4294967295]. |
bfd | Configure static route and BFD linkage. |
vrf | Name 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 terminalsonic(config)# ipv6 route 2001::2/96 2002::1 track 1
pbr-map pbr-map-name seq seq-num
Section titled “pbr-map pbr-map-name seq seq-num”[Command]
pbr-map pbr-map-name seq seq-num
[Purpose]
Create PBR policy and enter the PBR-map configuration view.
[Parameters]
Parameter | Description |
---|---|
pbr-map-name | PBR map name. |
seq-num | Sequence 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 1sonic(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]
Parameter | Description |
---|---|
dip | Destination IP, A.B.C.D/M or X:X::X:X/M. |
dst-port | Destination port number, range from 1 to 65535. |
ip-protocol | TCP/UDP. |
sip | Source IP, A.B.C.D/M or X:X::X:X/M. |
sport | Source 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 1sonic(config-pbr-map)# match src-ip 1.2.1.1/32sonic(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]
Parameter | Description |
---|---|
A.B.C.D|X:X::X:X | Next hop IP. |
next-group-name | Nexthop-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 1sonic(config-pbr-map)# set nexthop 83.0.0.1sonic(config-pbr-map)#
nexthop-group next-group-name
Section titled “nexthop-group next-group-name”[Command]
nexthop-group next-group-name
[Purpose]
Create a next-hop group and enter the next-hop group configuration mode.
[Parameters]
Parameter | Description |
---|---|
next-group-name | Nexthop-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 nextgroup1sonic(config-nh-group)#
nexthop {A.B.C.D|X:X::X:X}
Section titled “nexthop {A.B.C.D|X:X::X:X}”[Command]
nexthop {A.B.C.D|X:X::X:X}
[Purpose]
Configure the next hop.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D|X:X::X:X | Next 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 nextgroup1sonic(config-nh-group)# nexthop 82.0.0.1sonic(config-nh-group)#
pbr-policy pbr-map-name
Section titled “pbr-policy pbr-map-name”[Command]
pbr-policy pbr-map-name
[Purpose]
Bind PBR policy.
[Parameters]
Parameter | Description |
---|---|
pbr-map-name | PBR 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/0sonic(config-if-0/0)# pbr-policy pbrmap1sonic(config-if-0/0)#
IP Prefix List
Section titled “IP Prefix List”IP Prefix List View
Section titled “IP Prefix List View”Table 11 IP Prefix List View
Command | Purpose |
---|---|
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]
Parameter | Description |
---|---|
list_name | Specify the name of IP prefix list. |
[View]
Privileged User View
[Use Cases]
sonic# show ip prefix-list list1ZEBRA: 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 26OSPF: 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 26BGP: 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 26ISIS: 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
IP Prefix List Config
Section titled “IP Prefix List Config”Table 12 IP Prefix List Config
Command | Purpose |
---|---|
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]
Parameter | Description |
---|---|
list_name | Specify the name of IP prefix list. |
sequence_number | Specify the sequence number. |
A.B.C.D/M | Specifiy the network segment that this table entry matches. |
ge | Specify the minimum prefix length, and the range is from 0 to 32. |
le | Specify 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 terminalsonic(config)# ip prefix-list list1 seq 3 permit 10.0.0.0/24 le 26 ge 25
VRF View
Section titled “VRF View”Table 13 VRF View
Command | Purpose |
---|---|
show vrf brief | Display VRF configuration. |
show vrf interface | Display the binding relationship between VRFs and interfaces. |
show interface mgmt vrf | Display VRF configuration of management port. |
show vrf brief
Section titled “show vrf brief”[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 | |+------------+-------+-----------+
show vrf interface
Section titled “show vrf interface”[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 |+------------+--------------+
show interface mgmt vrf
Section titled “show interface mgmt vrf”[Command]
show interface mgmt vrf
[Purpose]
Display VRF configuration of management port.
[View]
Privileged User View
[Use Cases]
sonic# show interface mgmt vrfManagementVRF : Disabled
VRF Config
Section titled “VRF Config”Table 14 VRF Config
Command | Purpose |
---|---|
vrf mgmt | Set 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:HH | Configure the MAC address of VRF. |
ip route A.B.C.D/M A.B.C.D | Add routes for VRFs. |
vrf mgmt
Section titled “vrf mgmt”[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 terminalsonic(config)# interface mgmt 0sonic(config-mgmt-0)# vrf mgmt
vrf vrf_name (Global Configuration View)
Section titled “vrf vrf_name (Global Configuration View)”[Command]
vrf vrf_name
[Purpose]
Create a VRF.
[Parameters]
Parameter | Description |
---|---|
vrf_name | Specify 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 terminalsonic(config)# vrf 123
vrf vrf_name (Interface View)
Section titled “vrf vrf_name (Interface View)”[Command]
vrf vrf_name
[Purpose]
Bind the interface to the VRF.
[Parameters]
Parameter | Description |
---|---|
vrf_name | Specify 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 terminalsonic(config)# interface loopback 1sonic(config-loif-1)# vrf 123
mac HH:HH:HH:HH:HH:HH
Section titled “mac HH:HH:HH:HH:HH:HH”[Command]
mac HH:HH:HH:HH:HH:HH
[Purpose]
Configure the MAC address of VRF.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address. |
[View]
VRF Configuration View
[Notes]
Run command no mac to delete VRF MAC address configuration.
[Use Cases]
sonic# configure terminalsonic(config)# vrf 123sonic(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]
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. |
interface-type | The next-hop interface type. Optional parameters include ethernet, vlan, and link-aggregation. |
interface-name | Next-hop interface name. |
distance | Static route distance value,range from 1-255. Default value: 1. |
description | Specify the description for the route. In string form. |
track_id | Track ID, range from [1,4294967295]. |
bfd | Configure static route and BFD linkage. |
vrf | Name 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 terminalsonic(config)# vrf 123sonic(config-vrf)# ip route 10.0.0.0/24 20.0.0.2
Route-Map
Section titled “Route-Map”Route-Map View
Section titled “Route-Map View”Table 15 Route-Map View
Command | Purpose |
---|---|
show route-map [route-map|json] | Display route map. |
show route-map [route-map|json]
Section titled “show route-map [route-map|json]”[Command]
show route-map [route-map|json]
[Purpose]
Display route map.
[Parameters]
Parameter | Description |
---|---|
route-map | Route map name. |
[View]
Privileged User View
[Use Cases]
sonic# show route-mapZEBRA: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 routemapOSPF: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 routemapOSPF6: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 routemapBGP: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 routemapISIS: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
Route-Map Config
Section titled “Route-Map Config”Table 16 Route-Map Config
Command | Purpose |
---|---|
route-map route-map {permit|deny} seq-num | Create a route map and enter Route-map Configuration View. |
description description | Specify the description for the route-map. |
matchas-path as_path_filter_name | Match 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_value | Match local-preference of route. |
match metric metric_value | Match 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-number | Exclude from the as-path. |
setcommunity AA:NN | Set BGP Community. |
set community none | Set no BGP Community. |
set distance distance | Set BGP Administrative Distance to use. |
set extcommunitynone | Set no extended community attribute. |
set extcommunity rt ASN:NN_OR_IP-ADDRESS:NN | Set Route Target extended community. |
set extcommunity soo ASN:NN_OR_IP-ADDRESS:NN | Set 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_value | Set local-preference of route. |
set metric {metric_value|rtt|+rtt|-rtt} | Set metric value. |
set weight weight | Set BGP weight for routing table. |
route-map route-map {permit|deny} seq-num
Section titled “route-map route-map {permit|deny} seq-num”[Command]
route-map route-map {permit|deny} seq-num
[Purpose]
Create a route map and enter Route-map Configuration View.
[Parameters]
Parameter | Description |
---|---|
route-map | Route map name. |
seq-num | Sequence 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 100sonic(config-route-map)#
description description
Section titled “description description”[Command]
description description
[Purpose]
Specify the description for the route-map.
[Parameters]
Parameter | Description |
---|---|
description | In string form. |
[View]
Route-map Configuration View
[Notes]
Run command no description description to delete description.
[Use Cases]
sonic# configure terminalsonic(config)# route-map test permit 1000sonic(config)# description test
match as-path as_path_filter_name
Section titled “match as-path as_path_filter_name”[Command]
match as-path as_path_filter_name
[Purpose]
Match AS-path list.
[Parameters]
Parameter | Description |
---|---|
as_path_filter_name | AS-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 1000sonic(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]
Parameter | Description |
---|---|
community_list_number | Community-list number, range from 1 to 500. 1-99 as standard and 100-500 as expanded. |
community_list_name | Community name. |
exact-match | Exact 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 1000sonic(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]
Parameter | Description |
---|---|
extcommunity_list_number | Community-list number, range from 1 to 500. 1-99 as standard and 100-500 as expanded. |
extcommunity_list_name | Specify 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 1000sonic(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]
Parameter | Description |
---|---|
length | IP address length. |
list_name | Specify 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 1000sonic(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]
Parameter | Description |
---|---|
length | IP address length. |
list_name | Specify the name of IP prefix list. |
A.B.C.D | IPv4 address |
X:X::X:X | IPv6 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 1000sonic(config-route-map)# match ip next-hop type blackhole
match local-preference preference_value
Section titled “match local-preference preference_value”[Command]
match local-preference preference_value
[Purpose]
Match local-preference of route.
[Parameters]
Parameter | Description |
---|---|
preference_value | Route 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 1000sonic(config-route-map)# match local-preference 12
match metric metric_value
Section titled “match metric metric_value”[Command]
match metric metric_value
[Purpose]
Match metric of route.
[Parameters]
Parameter | Description |
---|---|
metric_value | Route 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 1000sonic(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]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address |
X:X::X:X | IPv6 address |
interface_name | interface 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 1000sonic(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]
Parameter | Description |
---|---|
as-path | AS number, range from 1 to 4294967295. Specify multiple AS numbers separated by spaces. |
last-as number | Use 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 1000sonic(config-route-map)# set as-path prepend 100 200
set as-path exclude AS-number
Section titled “set as-path exclude AS-number”[Command]
set as-path exclude AS-number
[Purpose]
Exclude from the as-path.
[Parameters]
Parameter | Description |
---|---|
AS-number | AS 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 1000sonic(config-route-map)# set as-path exclude 12
set community AA:NN
Section titled “set community AA:NN”[Command]
set community AA:NN
[Purpose]
Set BGP Community.
[Parameters]
Parameter | Description |
---|---|
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|blackhole | no-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 1000sonic(config-route-map)# set community 12
set community none
Section titled “set community none”[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 1000sonic(config-route-map)# set community none
set distance distance
Section titled “set distance distance”[Command]
set distance distance
[Purpose]
Set BGP Administrative Distance to use.
[Parameters]
Parameter | Description |
---|---|
distance | Range 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 1000sonic(config-route-map)# set distance 12
set extcommunity none
Section titled “set extcommunity none”[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 1000sonic(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]
Parameter | Description |
---|---|
ASN:NN_OR_IP-ADDRESS:NN | VPN 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 1000sonic(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]
Parameter | Description |
---|---|
ASN:NN_OR_IP-ADDRESS:NN | VPN 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 1000sonic(config-route-map)# set extcommunity soo 100:1:2
set ip next-hop {*A.B.C.D|*peer-address}
Section titled “set ip next-hop {*A.B.C.D|*peer-address}”[Command]
set ip next-hop {A.B.C.D|peer-address}
[Purpose]
Set next-hop IP address.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
peer-address | Use 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 1000sonic(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]
Parameter | Description |
---|---|
local X:X::X:X | IPv6 local address. |
global X:X::X:X | IPv6 global address. |
peer-address | Use 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 1000sonic(config-route-map)# set ipv6 next-hop local 100::1
set local-preference preference_value
Section titled “set local-preference preference_value”[Command]
set local-preference preference_value
[Purpose]
Set local-preference of route.
[Parameters]
Parameter | Description |
---|---|
preference_value | Preference 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 1000sonic(config-route-map)# set local-preference 12
set metric {metric_value|rtt|+rtt|-rtt}
Section titled “set metric {metric_value|rtt|+rtt|-rtt}”[Command]
set metric {metric_value|rtt|+rtt|-rtt}
[Purpose]
Set metric value.
[Parameters]
Parameter | Description |
---|---|
metric_value | Metric value (use +/- for additions or subtractions) (-4294967295-4294967295). |
rtt | Assign round trip time. |
+rtt | Add round trip time. |
-rtt | Subtract 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 1000sonic(config-route-map)# set metric 12
set weight weight
Section titled “set weight weight”[Command]
set weight weight
[Purpose]
Set BGP weight for routing table.
[Parameters]
Parameter | Description |
---|---|
weight | Weight 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 1000sonic(config-route-map)# set weight 12
SLA View
Section titled “SLA View”Table 17 SLA View
Command | Purpose |
---|---|
show sla summary | Display SLA configuration. |
show sla summary
Section titled “show sla summary”[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-------- ------ ----------- --------------------
SLA Config
Section titled “SLA Config”Table 18 SLA Config
Command | Purpose |
---|---|
sla sla-id icmp_echo dst_ip | Create 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 interval | Set the detection interval. |
set timeout timeout | Set the timeout of the detection. |
set dst_ip dst_ip | Set the destination IP for the detection. |
sla sla-id icmp_echo dst_ip
Section titled “sla sla-id icmp_echo dst_ip”[Command]
sla sla-id icmp_echo dst_ip
[Purpose]
Create an ICMP Echo mode SLA instance.
[Parameters]
Parameter | Description |
---|---|
sla-id | SLA ID, range from [1,4294967295]. |
dst_ip | Specify 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.1sonic(config-sla-icmp_echo)#
sla sla-id user_define [String]
Section titled “sla sla-id user_define [String]”[Command]
sla sla-id user_define [String]
[Purpose]
Create a user-defined SLA instance.
[Parameters]
Parameter | Description |
---|---|
sla-id | SLA ID, range from [1,4294967295]. |
String | Specify 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_definesonic(config-sla-user_define)#
set src_port {ethernet interface_name |link-aggregation interface_name|vlan vlan-id}
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]
Parameter | Description |
---|---|
interface_name | Interface name(eg.0/1) |
vlan-id | VLAN 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/0sonic(config-sla-icmp_echo)#
set interval interval
Section titled “set interval interval”[Command]
set interval interval
[Purpose]
Set the detection interval.
[Parameters]
Parameter | Description |
---|---|
interval | Specify 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
set timeout timeout
Section titled “set timeout timeout”[Command]
set timeout timeout
[Purpose]
Set the timeout of the detection.
[Parameters]
Parameter | Description |
---|---|
timeout | Specify 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
set dst_ip dst_ip
Section titled “set dst_ip dst_ip”[Command]
set dst_ip dst_ip
[Purpose]
Set the destination IP for the detection.
[Parameters]
Parameter | Description |
---|---|
dst_ip | Specify 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
Track View
Section titled “Track View”Table 19 Track View
Command | Purpose |
---|---|
show track summary | Display track configuration. |
show track summary
Section titled “show track summary”[Command]
show track summary
[Purpose]
Display track configuration.
[View]
Privileged User View
[Use Cases]
sonic# show track summaryTrack_id bind_sla-id state---------- ------------- -------
Track Config
Section titled “Track Config”Table 20 Track Config
Command | Purpose |
---|---|
track track_id sla sla_id | Create a track instance and bind the SLA instance. |
track track_id sla sla_id
Section titled “track track_id sla sla_id”[Command]
track track_id sla sla_id
[Purpose]
Create a track instance and bind the SLA instance.
[Parameters]
Parameter | Description |
---|---|
track_id | Track ID, range from [1,4294967295] |
sla_id | SLA 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
SLAAC View
Section titled “SLAAC View”Table 21 SLAAC View
Command | Purpose |
---|---|
show radv | Display RA configuration |
show radv
Section titled “show radv”[Command]
show radv
[Purpose]
Display RA configuration
[View]
Privileged User View
[Use Cases]
sonic# show radvEnabled: trueGlobal 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 |+-------------+---------------+----------------+--------------------+-----------+-----------------+------------+---------+-------------------------+
SLAAC Config
Section titled “SLAAC Config”Table 22 SLAAC Config
Command | Purpose |
---|---|
radv enable | Enable RA notification. |
radv dns-server X:X::X:X | Configure DNS information for RA notification. |
radv link-mtu mtu | Configure the MTU of the link for RA notification. |
radv prefix X:X::X:X/M | Configure 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-flag | Set the managed-flag to on. |
radv other-config-flag | Set the other-config-flag to on. |
radv offlink | Set the flag of on-link to off. |
radv no-autonomous | Set the flag of autonomous to off. |
radv ra-interval MaxRtrAdvInterval MinRtrAdvInterval | Configure the maximum and minimum time interval between two RA notifications |
radv enable
Section titled “radv enable”[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# configuresonic(config)# radv enablePlease enter 'radv commit' to take effectsonic(config)# radv commit
radv dns-server X:X::X:X
Section titled “radv dns-server X:X::X:X”[Command]
radv dns-server X:X::X:X
[Purpose]
Configure DNS information for RA notification.
[Parameters]
Parameter | Description |
---|---|
X:X::X:X | IPv6 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# configuresonic(config)# interface ethernet 0/52sonic(config-if-0/52)# radv dns-server 2002::2Please enter 'radv commit' to take effectsonic(config-if-0/52)# radv commit
radv link-mtu mtu
Section titled “radv link-mtu mtu”[Command]
radv link-mtu mtu
[Purpose]
Configure the MTU of the link for RA notification
[Parameters]
Parameter | Description |
---|---|
mtu | Set 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# configuresonic(config)# interface ethernet 0/52sonic(config-if-0/52)# radv link-mtu 1500Please enter 'radv commit' to take effectsonic (config-if-0/52)# radv commitsonic(config-if-0/52)#
radv prefix X:X::X:X/M
Section titled “radv prefix X:X::X:X/M”[Command]
radv prefix X:X::X:X/M
[Purpose]
Configure prefix information for RA notification.
[Parameters]
Parameter | Description |
---|---|
X:X::X:X/M | Network 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# configuresonic(config)# interface ethernet 0/52sonic(config-if-0/52)# radv prefix 3001::/64Please enter 'radv commit' to take effectsonic(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]
Parameter | Description |
---|---|
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# configuresonic(config)# interface ethernet 0/52sonic(config-if-0/52)# radv route-information 3001:1::/64 preference lowPlease enter 'radv commit' to take effectsonic(config-if-0/52)# radv commit
radv managed-flag
Section titled “radv managed-flag”[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# configuresonic(config)# interface ethernet 0/52sonic(config-if-0/52)# radv managed-flagPlease enter 'radv commit' to take effectsonic(config-if-0/52)# radv commit
radv other-config-flag
Section titled “radv other-config-flag”[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# configuresonic(config)# interface ethernet 0/52sonic(config-if-0/52)# radv other-config-flagPlease enter 'radv commit' to take effectsonic(config-if-0/52)# radv commit
radv offlink
Section titled “radv offlink”[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/52sonic(config-if-0/52)# radv offlinkPlease enter 'radv commit' to take effectsonic(config-if-0/52)# radv commit
radv no-autonomous
Section titled “radv no-autonomous”[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/52sonic(config-if-0/52)# radv no-autonomousPlease enter 'radv commit' to take effectsonic(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]
Parameter | Description |
---|---|
MaxRtrAdvInterval | the maximum time interval for RA notifications ,default value is 600,unit: seconds |
MinRtrAdvInterval | the 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# configuresonic(config)# interface ethernet 0/40sonic(config-if-0/40)# radv ra-interval 50 25Please enter 'radv commit' to take effectsonic(config-if-0/40)# radv commit
Table 23 Hash config
Command | Purpose |
---|---|
hash seed value | Set hash seed. |
hash enhancement | Enable Hash Enhancement |
hash mode {ipv4|ipv6|non_ip|ipv4-rdma|ipv6-rdma} hash_key | Set load-balance mode and hash key. |
hash seed value
Section titled “hash seed value”[Command]
hash seed value
[Purpose]
Set hash seed.
[Parameters]
Parameter | Description |
---|---|
value | The 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 terminalsonic(config)# hash seed 1000
hash enhancement
Section titled “hash enhancement”[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 terminalsonic(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]
Parameter | Description |
---|---|
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 terminalsonic(config)# hash mode ipv4 src-ip dst-ipsonic(config)# hash mode ipv6 src-ipv6 nextheader in-portsonic(config)# hash mode non-ip src-mac dst-mac vlan-id