Layer 2 Configuration
LAG View
Section titled “LAG View”Table 1 LAG View
Command | Purpose |
---|---|
show link-aggregation summary | Display LAG configuration. |
show {ip|ipv6} interfaces | Display IP address configuration of lag interfaces. |
show interface lag lag-id | Display information about the status of LAG interfaces. |
show link-aggregation summary
Section titled “show link-aggregation summary”[Command]
show link-aggregation summary
[Purpose]
Display LAG configuration.
[View]
Privileged User View
[Use Cases]
sonic# show link-aggregation summaryFlags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports----- --------------- ----------- ------------- 0001 PortChannel0001 LACP(A)(Dw) Ethernet46(D) 0002 PortChannel0002 LACP(A)(Dw) Ethernet47(D)
show {ip|ipv6} interfaces
Section titled “show {ip|ipv6} interfaces”[Command]
show {ip|ipv6} interfaces
[Purpose]
Display IP address configuration of lag interfaces.
[View]
Privileged User View
[Use Cases]
sonic# show ip interfacesInterface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP--------------- -------- ------------------- ------------ -------------- -------------0/0.2 2.0.0.1/24 up/down N/A N/A0/48 199.0.3.1/24 up/up N/A N/Aloopback0 10.1.0.34/32 up/up N/A N/Alag24 24.0.0.1/24 up/down N/A N/Amgmt 10.250.0.138/24 up/up N/A N/A
show interface lag lag-id
Section titled “show interface lag lag-id”[Command]
show interfacelag lag-id
[Purpose]
Display information about the status of LAG interfaces.
[Parameters]
Parameter | Description |
---|---|
lag-id | LAG ID, the range is from 1 to 9999. |
[View]
Privileged User View
[Use Cases]
sonic# show link-aggregation summaryFlags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports Description----- --------------- ----------- ------------- ------------- 0010 lag 10 LACP(A)(Up) 0/3 (D) N/A 0/2 (S) 0/4 (D)sonic# show interface lag 10lag10 is up, line protocol is upHardware is EthMac address is N/AInterface index is 0010Description is N/AMode of IPV4 address assignment: not-setMode of IPV6 address assignment: not-setIP MTU 9216 bytesLineSpeed 30.0G, CurrentSpeed 10.0G, Auto-negotiation offInput statistics: 82 packets, 14988 octets 82 Multicasts, 0 Broadcasts, 0 Unicasts 0 error, 0 discardedOutput statistics: 1205 packets, 158858 octets 1205 Multicasts, 0 Broadcasts, 0 Unicasts 0 error, 0 discarded
LAG Config
Section titled “LAG Config”Table 2 LAG Config
Command | Purpose |
---|---|
interface link-aggregation lag-id | Create a link-aggregation group and enter LAG Configuration View. |
description description | Specify the description for the lag. |
link-aggregation-group lag-id [port-priority port-priority] [lacp-key lacp-key] [lacp-portid lacp-portid] | Configure the lag member ports and set their attributes. |
mode {dynamic|static} | Set the aggregation mode. |
lacp min-links min-links | Set the minimum number of active links for LACP. |
lacp system-priority system-priority | Set system-priority for LACP. |
lacp system-id HH:HH:HH:HH:HH:HH | Set system-id for LACP. |
lacp fast-rate | Enable short timeout for LACP. |
lacp fallback | Enable fallback for LACP. |
mtu mtu | Configure the MTU value on a lag interface. |
shutdown | Bring the lag down administratively. |
ip address {A.B.C.D/M|A::B/M} [secondary] | Configure IP address for the lag interface. |
mac_address HH:HH:HH:HH:HH:HH | Specify a MAC address to the lag interface. |
mac-address learning | Enable MAC learning for the lag. |
lacp graceful-down | Dynamic LAG disconnects LACP interactions actively. |
interface link-aggregation lag-id
Section titled “interface link-aggregation lag-id”[Command]
interface link-aggregation lag-id
[Purpose]
Create a link-aggregation group and enter LAG Configuration View.
[Parameters]
Parameter | Description |
---|---|
lag-id | LAG ID, the range is from 1 to 9999. |
[View]
Global Configuration View
[Notes]
The default aggregation mode is LACP. Run command no interface link-aggregation lag-id to delete the link-aggregation group. The member ports should be removed before deleting.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# show this!interface link-aggregation 3
description description
Section titled “description description”[Command]
description description
[Purpose]
Specify the description for the lag.
[Parameters]
Parameter | Description |
---|---|
description | In string form. |
[View]
LAGIF Configuration View
[Notes]
Run command no description to delete description.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 100sonic(config-lagif-100)# description lag100sonic(config-lagif-100)# do show link-aggregation summaryFlags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not synced No. Team Dev Protocol Ports Description----- --------------- --------------- --------------------------- -------------0100 lag100 LACP(A)(Dw) lag100
link-aggregation-group lag-id [port-priority port-priority] [lacp-key lacp-key] [lacp-portid lacp-portid]
Section titled “link-aggregation-group lag-id [port-priority port-priority] [lacp-key lacp-key] [lacp-portid lacp-portid]”[Command]
link-aggregation-group lag-id [port-priority port-priority] [lacp-key lacp-key] [lacp-portid lacp-portid]
[Purpose]
Configure the lag member ports and set their attributes.
[Parameters]
Parameter | Description |
---|---|
lag-id | LAG ID, the range is from 1 to 9999. |
port-priority | Port priority, the range is 0-65535. The default is 255. |
lacp-key | LACP message key value, the range is 0-65535. The default is 0. |
lacp-portid | Interface id value, the range is 0-65535 |
[View]
Physical Interface Configuration View
[Notes]
Run command no link-aggregation-group lag-id to delete aggregation member ports.
[Use Cases]
sonic# configure terminalsonic(config)# interface ethernet 0/45sonic(config-if-0/45)# link-aggregation-group 1sonic# show link-aggregation summaryFlags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available, S - selected, D - deselected, * - not syncedNo. Team Dev Protocol Ports----- --------------- ----------- --------------------------- PortChanne000l LACP(A)(Dw) N/A0001 PortChannel0001 LACP(A)(Dw) Ethernet46(D) Ethernet45(D)0002 PortChannel0002 LACP(A)(Dw) Ethernet47(D)sonic(config-if-0/45)# link-aggregation-group 1 port-priority 500sonic(config-if-0/45)# link-aggregation-group 2 port-priority 500 lacp-key 10 lacp-portid 60
mode {dynamic|static}
Section titled “mode {dynamic|static}”[Command]
mode {dynamic|static}
[Purpose]
Set the aggregation mode.
[View]
LAGIF Configuration View
[Notes]
Run commit to take effect; The default is dynamic(LACP).
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# mode dynamicsonic (config-lagif-3)# show this!interface link-aggregation 3 mode dynamic
lacp min-links min-links
Section titled “lacp min-links min-links”[Command]
lacp min-links min-links
[Purpose]
Set the minimum number of active links for LACP.
[Parameters]
Parameter | Description |
---|---|
min-links | The minimum number of active links, the range is 1-128. |
[View]
Dynamic LAGIF Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp min-links 2sonic (config-lagif-3)# show this!interface link-aggregation 3lacp min-links 2mode dynamic
lacp system-priority system-priority
Section titled “lacp system-priority system-priority”[Command]
lacp system-priority system-priority
[Purpose]
Set system-priority for LACP.
[Parameters]
Parameter | Description |
---|---|
system-priority | System priority, the range is 0-65535. |
[View]
Dynamic LAGIF Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp system-priority 100sonic (config-lagif-3)# show this!interface link-aggregation 3lacp system-priority 100 mode dynamic
lacp system-id HH:HH:HH:HH:HH:HH
Section titled “lacp system-id HH:HH:HH:HH:HH:HH”[Command]
lacp system-id HH:HH:HH:HH:HH:HH
[Purpose]
Set system-id for LACP.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address. |
[View]
Dynamic LAGIF Configuration View
[Notes]
Run command no lacp system-id to delete system-id configuration.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp system-id 00:a0:23:12:23:53sonic (config-lagif-3)# show this!interface link-aggregation 3commitlacp system-id 00:a0:23:12:23:53mode dynamic
lacp fast-rate
Section titled “lacp fast-rate”[Command]
lacp fast-rate
[Purpose]
Enable short timeout for LACP.
[View]
Dynamic LAGIF Configuration View
[Notes]
The default LACP timeout mode is long timeout. Run command no lacp fast-rate to disable short timeout for LACP.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp fast-ratesonic (config-lagif-3)# show this!interface link-aggregation 3lacp fast-ratemode dynamic
lacp fallback
Section titled “lacp fallback”[Command]
lacp fallback
[Purpose]
Enable fallback for LACP.
[View]
Dynamic LAGIF Configuration View
[Notes]
Run command no lacp fallback to disable fallback for LACP.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# lacp fallbacksonic (config-lagif-3)# show this!interface link-aggregation 3lacp fallbackmode dynamic
mtu mtu
Section titled “mtu mtu”[Command]
mtu mtu
[Purpose]
Configure the MTU value on a lag interface.
[Parameters]
Parameter | Description |
---|---|
mtu | Maximum Transmission Unit, the range is from 1312 to 9216. The default is 9216 Bytes. |
[View]
LAGIF Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic (config-lagif-3)# mtu 2000sonic (config-lagif-3)# show this!interface link-aggregation 3 mtu 2000
shutdown
Section titled “shutdown”[Command]
shutdown
[Purpose]
Bring the lag down administratively.
[View]
LAGIF Configuration View
[Notes]
Run command no shutdown to bring the lag up administratively.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# shutdownsonic(config-lagif-3)# show this!interface link-aggregation 3 shutdown
ip address {A.B.C.D/M|A::B/M} [secondary]
Section titled “ip address {A.B.C.D/M|A::B/M} [secondary]”[Command]
ip address {A.B.C.D/M|A::B/M} [secondary]
[Purpose]
Configure IP address for the lag interface.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D/M | IPv4 address with prefix length. |
A::B/M | IPv6 address with prefix length. |
secondary | The default is Primary IP, specifying this option means configuring as Secondary IP, which requires that the Secondary IP and Primary IP be in the same network segment. |
[View]
LAGIF Configuration View
[Notes]
IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed. Run command no ip address {A.B.C.D/M|A::B/M} [secondary] to delete IP address configuration of the lag interface.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# ip address 3.3.3.6/24sonic(config-lagif-3)# show this!interface link-aggregation 3ip address 3.3.3.6/24
mac_address HH:HH:HH:HH:HH:HH
Section titled “mac_address HH:HH:HH:HH:HH:HH”[Command]
mac_address HH:HH:HH:HH:HH:HH
[Purpose]
Specify a MAC address to the lag interface.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address, not case sensitive. |
[View]
LAGIF Configuration View
[Notes]
The default is the MAC of the switch; Run command no mac_address to restore the MAC of the lag interface to default.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# mac-address 18:17:25:37:67:afsonic(config-lagif-3)# show this!interface link-aggregation 3mac-address 18:17:25:37:67:af
mac-address learning
Section titled “mac-address learning”[Command]
mac-address learning
[Purpose]
Enable MAC learning for the lag.
[View]
LAGIF Configuration View
[Notes]
The interface to be operated should be added to a VLAN. MAC learning is enabled by default. Run command no mac-address learning to disable MAC learning for the lag.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# no mac-address learningsonic(config-lagif-3)# show this!interface link-aggregation 3 no mac-address learning
lacp graceful-down
Section titled “lacp graceful-down”[Command]
lacp graceful-down
[Purpose]
Dynamic LAG disconnects LACP interactions actively.
[View]
LAGIF Configuration View
[Notes]
After executing the no lacp graceful-down command, the LAG resumes lacp interaction. This command is valid for a single time and will not be saved to the configuration, i.e., the LAG interface will be restored to UP after reboot or reload.
[Use Cases]
sonic# configure terminalsonic(config)# interface link-aggregation 3sonic(config-lagif-3)# lacp graceful-down
LLDP View
Section titled “LLDP View”Table 3 LLDP View
Command | Purpose |
---|---|
show lldp neighbor {summary|interface interface_name} | Display LLDP neighbors. |
showlldp local {summary|interface interface_name} | Display LLDP configuration |
show lldp neighbor {summary|interface interface_name}
Section titled “show lldp neighbor {summary|interface interface_name}”[Command]
show lldp neighbor {summary|interface interface_name}
[Purpose]
Display LLDP neighbors.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Privileged User View
[Use Cases]
sonic# show lldp neighbor summaryCapability codes: (R) Router, (B) Bridge, (O) OtherLocalPort RemoteDevice RemotePortID Capability RemotePortDescr----------- -------------- -------------- ------------ -----------------0/48 spine-228 C1 BR Ethernet00/60 sonic C6 BR Ethernet680/72 sonic-102 C7 BR 0/72--------------------------------------------------Total entries displayed: 3sonic# show lldp neighbor interface 0/48-------------------------------------------------------------------------------LLDP neighbors:-------------------------------------------------------------------------------Interface: 0/48 , via: LLDP, RID: 1, Time: 1 day, 08:51:31 Chassis: ChassisID: mac 18:17:25:37:65:40 SysName: spine-228 SysDescr: Debian GNU/Linux 9 (stretch) Linux 4.9.0-14-2-amd64 #1 SMP Debian 4.9.246-2 (2020-12-17) x86_64 MgmtIP: 10.250.0.228 MgmtIface: 2 Capability: Bridge, on Capability: Router, on Capability: Wlan, off Capability: Station, off Port: PortID: local C1 PortDescr: 0/0 TTL: 120-------------------------------------------------------------------------------
show lldp local {summary|interface interface_name}
Section titled “show lldp local {summary|interface interface_name}”[Command]
show lldp local {summary|interface interface_name}
[Purpose]
Display LLDP configuration.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Privileged User View
[Use Cases]
sonic# show lldp local summary-------------------------------------------------------------------------------Global configuration:-------------------------------------------------------------------------------Configuration: Transmit delay: 30 Transmit delay in milliseconds: 30000 Transmit hold: 4 Maximum number of neighbors: 32 Receive mode: no Pattern for management addresses: 10.250.0.171 Interface pattern: Ethernet*,eth0 Permanent interface pattern: (none) Interface pattern for chassis ID: eth0 Override chassis ID with: (none) Override description with: SONiC Software Version: SONiC.V3.1R0406P01T08 - HwSku: CX532P-N - Distribution: Debian 11.10 - Kernel: 5.10.0-8-2-amd64 Override platform with: Linux Override system name with: sonic Advertise version: yes Update interface descriptions: no Promiscuous mode on managed interfaces: no Disable LLDP-MED inventory: yes LLDP-MED fast start mechanism: yes LLDP-MED fast start interval: 1 Source MAC for LLDP frames on bond slaves: local Port ID TLV subtype for LLDP frames: unknown Agent type: unknown-------------------------------------------------------------------------------sonic# show lldp local interface 0/4-------------------------------------------------------------------------------LLDP interfaces:-------------------------------------------------------------------------------Interface: Ethernet4, via: LLDP, Time: 0 day, 09:11:32 Chassis: ChassisID: mac 74:fe:48:7b:23:1a SysName: sonic SysDescr: SONiC Software Version: SONiC.V3.1R0406P01T08 - HwSku: CX532P-N - Distribution: Debian 11.10 - Kernel: 5.10.0-8-2-amd64 MgmtIP: 10.250.0.171 MgmtIface: 2 Capability: Bridge, on Capability: Router, on Capability: Wlan, off Capability: Station, off Port: PortID: local C2 PortDescr: Ethernet4 TTL: 120-------------------------------------------------------------------------------
LLDP Config
Section titled “LLDP Config”Table 4 LLDP Config
Command | Purpose |
---|---|
lldp {enable|disable} | Enable or disable LLDP globally. |
lldp message-transmission interval interval-time | Set the LLDP message sending interval. |
lldp message-transmission hold hold-multiplier | Set the multiplier for LLDP messages hold time in neighboring devices. |
lldp port-id-subtype {local|mac-addreess|ifname} | Set the subtype in LLDP messages. |
lldp management-address-advertisements enable | Advertise the management IP address in LLDP messages. |
lldp capabilities-advertisements enable | Advertise the features supported and enabled by the device in the LLDP message |
lldp admin-status { tx|rx|txrx|disable} | Set the operating mode of LLDP for the interface as send-only/receive-only/send and receive/ not send and receive. |
lldp {enable|disable}
Section titled “lldp {enable|disable}”[Command]
lldp {enable|disable}
[Purpose]
Enable or disable LLDP globally.
[View]
Global Configuration View
[Use Cases]
sonic(config)# lldp enable
lldp message-transmission interval interval-time
Section titled “lldp message-transmission interval interval-time”[Command]
lldp message-transmission interval interval-time
[Function] Set the LLDP message sending interval.
[Parameters]
Parameter | Description |
---|---|
interval-time | Interval time, range 5-32768 |
[View]
Global Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# lldp message-transmission interval 10
lldp message-transmission hold hold-multiplier
Section titled “lldp message-transmission hold hold-multiplier”[Command]
lldp message-transmission hold hold-multiplier
[Function] Set the multiplier for LLDP messages hold time in neighboring devices.
[Parameters]
Parameter | Description |
---|---|
hold-multiplier | Multiplier of hold time, range 2-10 |
[View]
Global Configuration View
[Notes]
Calculation formula for multiplier of LLDP message hold time: TTL = Min (65535, (interval × hold))
[Use Cases]
sonic# configure terminalsonic(config)# lldp message-transmission hold 10
lldp port-id-subtype {local|mac-addreess|ifname}
Section titled “lldp port-id-subtype {local|mac-addreess|ifname}”[Command]
lldp port-id-subtype {local|mac-addreess|ifname}
[Function] Set the subtype in LLDP messages.
[View]
Global Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# lldp port-id-subtype local
lldp management-address-advertisements enable
Section titled “lldp management-address-advertisements enable”[Command]
lldp management-address-advertisements enable
[Function] Advertise the management IP address in LLDP messages.
[View]
Global Configuration View
[Notes]
The default configuration is to enable management IP address advertisement. Run commandno lldp management-address-advertisements enable command to disable the advertisement of management IP address in LLDP messages.
[Use Cases]
sonic# configure terminalsonic(config)# lldp management-address-advertisements enable
lldp capabilities-advertisements enable
Section titled “lldp capabilities-advertisements enable”[Command]
lldp capabilities-advertisements enable
[Function] Advertise the features supported and enabled by the device in the LLDP message
[View]
Global Configuration View
[Notes]
The default configuration is to enable LLDP capabilities-advertisements Run command no lldp capabilities-advertisements enable to disable LLDP capabilities-advertisements.
[Use Cases]
sonic# configure terminalsonic(config)# lldp capabilities-advertisements enable
lldp admin-status { tx|rx|txrx|disable}
Section titled “lldp admin-status { tx|rx|txrx|disable}”[Command]
lldp admin-status {tx|rx|txrx|disable}
[Purpose]
Set the operating mode of LLDP for the interface as send-only/receive-only/send and receive/not send and receive.
[View]
Physical Interface Configuration View
[Notes]
The default mode is txrx.
[Use Cases]
sonic(config)# interface ethernet 0/0sonic(config-if-0/0)# lldp admin-status rx
STP View
Section titled “STP View”Table 5 STP View
Command | Purpose |
---|---|
show mstp bridge | Display MSTI status. |
show mstp brief [{ethernet|link-aggregation} interface_name] | Display information about the port status in CIST. |
show mstp interface [{ethernet|link-aggregation} interface_name] | Display detailed information about the status of the ports in CIST. |
show mstp mstconfid | Display summary information about the MST domain configuration currently in effect. |
show mstp status | Display status of MSTP. |
show mstp tree instance-id | Display MSTI status of the specified MSTP instance. |
show mstp treeport {ethernet|link-aggregation} interface_name instance instance-id | Displays MSTI port status details. |
show mstp bridge
Section titled “show mstp bridge”[Command]
show mstp bridge
[Purpose]
Display MSTI status.
[View]
Privileged User View
[Use Cases]
sonic# show mstp bridgeBridge CIST info enabled yes bridge id 8.000.00:00:01:02:03:04 designated root 8.000.00:00:01:02:03:04 regional root 8.000.00:00:01:02:03:04 root port none path cost 0 internal path cost 0 max age 20 bridge max age 20 forward delay 15 bridge forward delay 15 tx hold count 6 max hops 20 hello time 2 ageing time 300 force protocol version mstp time since topology change 2497 topology change count 9 topology change no topology change port Ethernet64 last topology change port PortChannel0111
show mstp brief [{ethernet|link-aggregation} interface_name]
Section titled “show mstp brief [{ethernet|link-aggregation} interface_name]”[Command]
show mstp brief [{ethernet|link-aggregation} interface_name]
[Purpose]
Display information about the status of ports in CIST.
[Parameters]
Parameter | Description |
---|---|
interface_name | interface name |
[View]
Privileged User View
[Use Cases]
sonic# show mstp briefport bridge point-to-point oper-edge-port port-id enabled state role designated-bridge designated-port designated-root--------------- -------- ---------------- ---------------- --------- --------- ---------- ---------- ----------------------- ----------------- -----------------------0/8 Bridge yes yes 8.002 yes forwarding Designated 8.000.60:EB:5A:01:06:6D 8.002 8.000.60:EB:5A:01:06:6Dlag111 Bridge no no 8.003 no discarding Disabled 8.000.60:EB:5A:01:06:6D 0 8.000.60:EB:5A:01:06:6D
show mstp interface [{ethernet|link-aggregation} interface_name]
Section titled “show mstp interface [{ethernet|link-aggregation} interface_name]”[Command]
show mstp interface [{ethernet|link-aggregation} interface_name]
[Purpose]
Display detailed information about the status of the ports in CIST.
[Parameters]
Parameter | Description |
---|---|
interface_name | interface name |
[View]
Privileged User View
[Use Cases]
sonic# show mstp interfaceBridge:0/2 CIST info enabled no role Disabled port id 8.006 state discarding external port cost 200000000 admin external cost 0 internal port cost 200000000 admin internal cost 0 designated root 8.000.60:EB:5A:01:10:C9 dsgn external cost 0 dsgn regional root 8.000.60:EB:5A:01:10:C9 dsgn internal cost 0 designated bridge 8.000.60:EB:5A:01:10:C9 designated port 0.000 admin edge port no auto edge port yes oper edge port no topology change ack no point-to-point no admin point-to-point auto restricted role no restricted TCN no port hello time 2 disputed no bpdu guard port no bpdu guard error no network port no BA inconsistent no bpdu filter port no Num RX BPDU Filtered 0 Num TX BPDU 0 Num TX TCN 0 Num RX BPDU 0 Num RX TCN 0 Num Transition FWD 0 Num Transition BLK 1 Rcvd BPDU no Rcvd STP no Rcvd RSTP no Send RSTP yes Rcvd TC Ack no Rcvd TCN no
show mstp mstconfid
Section titled “show mstp mstconfid”[Command]
show mstp mstconfid
[Purpose]
Display summary information about the MST domain configuration currently in effect.
[View]
Privileged User View
[Use Cases]
sonic# show mstp mstconfidBridge MST Configuration Identifier: Format Selector: 0 Configuration Name: test Revision Level: 0 Configuration Digest: F3B784B6F462AE5FE28E6578DBF77D2E
show mstp status
Section titled “show mstp status”[Command]
show mstp status
[Purpose]
Display status of MSTP.
[View]
Privileged User View
[Use Cases]
sonic# show mstp statusrole Flags: Root - Root, Desg - Designated, Altn - Alternate, Back - Backup, Mstr - Master, Disa - Disabledstate Flags: disc - Discard/Blocking/Listening, lear - Learning, forw - ForwardingSpanning-tree Mode: mstpvlan mst instance port_role_state------- -------------- -------------------------------------------------------vlan10 0 lag5(Desg)(forw) lag9(Desg)(forw)vlan20 0
show mstp tree instance-id
Section titled “show mstp tree instance-id”[Command]
show mstp tree instance-id
[Purpose]
Display MSTI status of the specified MSTP instance.
[Parameters]
Parameter | Description |
---|---|
instance-id | MSTP instance ID. |
[View]
Privileged User View
[Use Cases]
sonic# show mstp tree 0Bridge MSTI 0 info bridge id 8.000.00:00:01:02:03:04 regional root 8.000.00:00:01:02:03:04 root port none internal path cost 0 time since topology change 2560 topology change count 9 topology change no topology change port Ethernet64 last topology change port PortChannel0111sonic# show mstp tree 1Bridge MSTI 1 info bridge id 8.001.00:00:01:02:03:04 regional root 8.001.00:00:01:02:03:04 root port none internal path cost 0 time since topology change 2563 topology change count 9 topology change no topology change port Ethernet64 last topology change port PortChannel0111
show mstp treeport {ethernet|link-aggregation} interface_name instance instance-id
Section titled “show mstp treeport {ethernet|link-aggregation} interface_name instance instance-id”[Command]
show mstp treeport {ethernet|link-aggregation} interface_name instance instance-id
[Purpose]
Displays MSTI port status details.
[Parameters]
Parameter | Description |
---|---|
interface_name | interface name |
instance-id | MSTP instance ID. |
[View]
Privileged User View
[Use Cases]
sonic# show mstp treeport ethernet 0/64 instance 1Bridge:0/64 MSTI 1 info role Designated port id 8.00A state forwarding disputed no internal port cost 200 admin internal cost 0 dsgn regional root 8.001.00:00:01:02:03:04 dsgn internal cost 0 designated bridge 8.001.00:00:01:02:03:04 designated port 8.00Asonic# show mstp treeport ethernet 0/64 instance 3Bridge:0/64 MSTI 3 info role Root port id 8.00A state forwarding disputed no internal port cost 200 admin internal cost 0 dsgn regional root 0.003.60:EB:5A:01:14:CC dsgn internal cost 0 designated bridge 0.003.60:EB:5A:01:14:CC designated port 8.004
STP Config
Section titled “STP Config”Table 6 STP config
Command | Purpose |
---|---|
bridge mac HH:HH:HH:HH:HH:HH | Configure Bridge MAC address. |
mstp enable | Enable MSTP globally. |
mstp {forward_delay|hello|max_age|name} value | Set the attributes of MSTP. |
mstp cost interface {ethernet|link-aggregation} interface_name cost_value | Set the external path cost. |
mstp instance instance-id | Create a MSTP instance and enter MSTP Instance Configuration View. |
priority priority | Set the priority of the MSTP instance. |
interface priority priority interface {ethernet|link-aggregation} interface_name | Set the interface priority of all member ports under the MSTP instance. |
vlan vlan-id (MSTP Instance Configuration View) | Bind the VLAN to the MSTP instance. |
mstp cost interface {ethernet|link-aggregation} interface_name cost_value | Set the internal path csot of the instance. |
mstp auto-edge enable interface {ethernet|link-aggregation} interface_name | Enable MSTP auto edge for the interface. |
mstp edge-port enable interface {ethernet|link-aggregation} interface_name | Enable MSTP manual edge for the interface. |
mstp bpdu-filter enable interface {ethernet|link-aggregation} interface_name | Enable BPDU filtering for the interface. |
mstp bpdu-guard enable interface {ethernet|link-aggregation} interface_name | Enable BPDU guard for the interface. |
bridge mac HH:HH:HH:HH:HH:HH
Section titled “bridge mac HH:HH:HH:HH:HH:HH”[Command]
bridge mac HH:HH:HH:HH:HH:HH
[Purpose]
Configure Bridge MAC address.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address. |
[View]
Global Configuration View
[Notes]
The default is the MAC of the switch; Run command no bridge mac to restore the Bridge MAC address to default.
[Use Cases]
sonic(config)# bridge mac 00:44:55:66:77:88
mstp enable
Section titled “mstp enable”[Command]
mstp enable
[Purpose]
Enable MSTP globally.
[View]
Global Configuration View
[Notes]
Run command mstpdisable to disable MSTP.
[Use Cases]
sonic(config)# mstp enable
mstp {forward_delay|hello|max_age|name} value
Section titled “mstp {forward_delay|hello|max_age|name} value”[Command]
mstp {forward_delay|hello|max_age|name} value
[Purpose]
Set the attributes of MSTP.
[Parameters]
Parameter | Description |
---|---|
forward_delay | Specify the port state changing time in seconds. The range is [4,30], and the default is 15. |
hello | Specify the interval of sending BPDUs in seconds. The range is [1,10], and the default is 2. |
max_age | Specify the maximum aging value in seconds. The range is [10,1000000], and the default is 20. |
name | Specify the domain name of the Bridge in string form. |
value | The value of the attribute. |
[View]
Global Configuration View
[Notes]
MSTP should be enabled before configuration. Run command no mstp {forward_delay|hello|max_age|name} to restore to default configuration.
[Use Cases]
sonic(config)# mstp hello 5sonic(config)# mstp name region1
mstp cost interface {ethernet|link-aggregation} interface_name cost_value
Section titled “mstp cost interface {ethernet|link-aggregation} interface_name cost_value”[Command]
mstp cost interface {ethernet|link-aggregation} interface_name cost_value
[Purpose]
Set the external path cost.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
cost_value | Specify the cost, and the range is [1,200000000] |
[View]
Global Configuration View
[Notes]
MSTP should be enabled before configuration. The default cost can be calculated as: cost = 200000000 / link speed (in 100Kbps). Run command no mstp cost interface {ethernet|link-aggregation} interface_name to restore to default cost.
[Use Cases]
sonic(config)# mstp cost interface ethernet 0/0 10
mstp instance instance-id
Section titled “mstp instance instance-id”[Command]
mstp instance instance-id
[Purpose]
Create a MSTP instance and enter MSTP Instance Configuration View.
[Parameters]
Parameter | Description |
---|---|
instance-id | MSTP instance ID, the range is [1,255]. |
[View]
Global Configuration View
[Notes]
MSTP should be enabled before configuration. Instance 0 is the default instance, cannot be created or deleted. Run command no mstp instance instance-id to delete MSTP instance.
[Use Cases]
sonic(config)# mstp instance 2sonic(config-mstp-instance-2)#
priority priority
Section titled “priority priority”[Command]
priority priority
[Purpose]
Set the priority of the MSTP instance.
[Parameters]
Parameter | Description |
---|---|
priority | Specify the priority of the instance, the range is [0,15]. The default is 8. The smaller the value, the higher the priority. |
[View]
MSTP Instance Configuration View
[Notes]
MSTP should be enabled before configuration. Run command no priority to restore to default priority.
[Use Cases]
sonic(config)# mstp instance 2sonic(config-mstp-instance-2)# priority 1
interface priority priority interface {ethernet|link-aggregation} interface_name
Section titled “interface priority priority interface {ethernet|link-aggregation} interface_name”[Command]
interface priority priority interface {ethernet|link-aggregation} interface_name
[Purpose]
Set the interface priority under the MSTP instance.
[Parameters]
Parameter | Description |
---|---|
priority | Specify the priority of the interfaces, the range is [0,15]. The default is 8. The smaller the value, the higher the priority. |
[View]
MSTP Instance Configuration View
[Notes]
MSTP should be enabled before configuration. Run command no interface priority interface {ethernet|link-aggregation} interface_name to restore to default priority.
[Use Cases]
sonic(config)# mstp instance 2sonic(config-mstp-instance-2)# interface priority 1 interface ethernet 0/0
vlan vlan-id (MSTP Instance Configuration View)
Section titled “vlan vlan-id (MSTP Instance Configuration View)”[Command]
vlan vlan-id
[Purpose]
Bind the VLAN to the MSTP instance.
[Parameters]
Parameter | Description |
---|---|
vlan-id | VLAN ID, the range is [1,4094]. |
[View]
MSTP Instance Configuration View
[Notes]
MSTP should be enabled before configuration. Run command no vlan vlan-id to unbind the VLAN from the MSTP instance.
[Use Cases]
sonic(config)# mstp instance 2sonic(config-mstp-instance-2)# vlan 100
cost interface {ethernet|link-aggregation} interface_name cost_value
Section titled “cost interface {ethernet|link-aggregation} interface_name cost_value”[Command]
cost interface {ethernet|link-aggregation} interface_name cost_value
[Purpose]
Set the internal path csot of the instance.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
cost_value | Specify the cost, and the range is [1,200000000] |
[View]
MSTP Instance Configuration View
[Notes]
MSTP should be enabled before configuration. The default cost can be calculated as: cost = 200000000 / link speed (in 100Kbps). Run command no cost interface {ethernet|link-aggregation} interface_nam to restore to default cost.
[Use Cases]
sonic(config)# mstp instance 0sonic(config-mstp-instance-0)# cost interface ethernet 0/0 10
mstp auto-edge enable interface {ethernet|link-aggregation} interface_name
Section titled “mstp auto-edge enable interface {ethernet|link-aggregation} interface_name”[Command]
mstpauto-edge enable interface {ethernet|link-aggregation} interface_name
[Purpose]
Enable MSTP auto edge for the interface.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Global Configuration View
[Notes]
The auto-edge interface feature is enabled by default on all Layer 2 ports. An interface with auto-edge enabled does the following things when its state changes from down to up: waiting for 3 seconds and trying to receive BPDUs; If no BPDU is received, it becomes an edge port and will lose edge port role the first time it receives a BPDU thereafter. Run command mstp auto-edge disable interface {ethernet|link-aggregation} interface_name to disable auto edge port, after that, if you do not assign it as a manual edge port, it will lose edge port role.
[Use Cases]
sonic(config)# mstp auto-edge enable interface link-aggregation 99
mstp edge-port enable interface {ethernet|link-aggregation} interface_name
Section titled “mstp edge-port enable interface {ethernet|link-aggregation} interface_name”[Command]
mstp edge-port enable interface {ethernet|link-aggregation} interface_name
[Purpose]
Enable MSTP manual edge for the interface.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Global Configuration View
[Notes]
Manual edge port is disabled by default on all Layer 2 ports. When a manual edge port is enabled on an interface, it immediately becomes an edge port until it receives a BPDU message. The priority of manual edge port configuration is higher than auto edge port, that is, when manual edge port is enabled, auto edge port configuration is invalid. Run command mstp edge-port disable interface {ethernet|link-aggregation} interface_name to disable MSTP manual edge port feature.
[Use Cases]
sonic(config)# mstp edge-port enable interface link-aggregation 99
mstp bpdu-filter enable interface {ethernet|link-aggregation} interface_name
Section titled “mstp bpdu-filter enable interface {ethernet|link-aggregation} interface_name”[Command]
mstp bpdu-filter enable interface {ethernet|link-aggregation} interface_name
[Purpose]
Enable BPDU filtering for the interface.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Global Configuration View
[Notes]
This command will enable MSTP at interface level and determines whether the interface participates in MSTP protocol operation. The interface to be operated should be a Layer 2 port, and MSTP should be enabled before configuration. By default, MSTP is enabled on all Layer 2 interfaces. After this function is enabled, the interface will not participate in MSTP protocol operation, and there will be a risk of loops, therefore, please take caution. Run command mstp bpdu-filter disable interface {ethernet|link-aggregation} interface_name to disable BPDU filtering.
[Use Cases]
sonic(config)# mstp bpdu-filter enable interface link-aggregation 99
mstp bpdu-guard enable interface {ethernet|link-aggregation} interface_name
Section titled “mstp bpdu-guard enable interface {ethernet|link-aggregation} interface_name”[Command]
mstp bpdu-guard enable interface {ethernet|link-aggregation} interface_name
[Purpose]
Enable BPDU guard for the interface.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Global Configuration View
[Notes]
When the interface is enabled with BPDU message protection, it will be admin down if received a BPDU. Run command mstp bpdu-guard disable interface {ethernet|link-aggregation} interface_name to disable BPDU guard.
[Use Cases]
sonic(config)# mstp bpdu-guard enable interface link-aggregation 99
VLAN View
Section titled “VLAN View”Table 7 VLAN View
Command | Purpose |
---|---|
show vlan summary | Display summary information about VLANs. |
show vlan summary vlan-id | Display specific VLAN summary information |
show vlan vlan-id | Display specific information about the VLAN. |
show vlan all | Display detailed information about all VLANs. |
show {ip|ipv6} interfaces | Display IP address configuration of VLAN interfaces. |
show counters vlan | Display VLAN interfaces statistics. |
show vlan summary
Section titled “show vlan summary”[Command]
show vlan summary
[Purpose]
Display summary information about VLANs.
[View]
Privileged User View
[Use Cases]
sonic# show vlan summary+-----------+----------------+-----------+----------------+-----------------------+| VLAN ID | IP Address | Ports | Port Tagging | DHCP Helper Address |+===========+================+===========+================+=======================+| 1000 | 192.168.0.1/21 | Ethernet0 | untagged | 192.0.0.1 || | | Ethernet1 | untagged | 192.0.0.2 || | | Ethernet2 | untagged | 192.0.0.3 || | | Ethernet3 | untagged | 192.0.0.4 |+-----------+----------------+-----------+----------------+-----------------------+| 1200 | | | | |+-----------+----------------+-----------+----------------+-----------------------+
show vlan summary vlan-id
Section titled “show vlan summary vlan-id”[Command]
show vlan summary vlan-id
[Purpose]
Display specific VLAN summary information.
[Parameters]
Parameter | Description |
---|---|
vlan-id | VLAN ID |
[View]
Privileged User View
[Use Cases]
sonic# show vlan summary 1000+-----------+----------------+-----------+----------------+-----------------------+| VLAN ID | IP Address | Ports | Port Tagging | DHCP Helper Address |+===========+================+===========+================+=======================+| 1000 | 192.168.0.1/21 | Ethernet0 | untagged | 192.0.0.1 || | | Ethernet1 | untagged | 192.0.0.2 || | | Ethernet2 | untagged | 192.0.0.3 || | | Ethernet3 | untagged | 192.0.0.4 |+-----------+----------------+-----------+----------------+-----------------------+
show vlan vlan-id
Section titled “show vlan vlan-id”[Command]
show vlan vlan-id
[Purpose]
Display specific information about the VLAN.
[Parameters]
Parameter | Description |
---|---|
vlan-id | VLAN ID, the range is [1,4094]. |
[View]
Privileged User View
[Use Cases]
sonic(config)# show vlan 300VLAN ID: 300Route interface:Name: VLAN 300Tagged ports:Untagged ports: 0/0MAC-learning: enable
show vlan all
Section titled “show vlan all”[Command]
show vlanall
[Purpose]
Display detailed information about all VLANs.
[View]
Privileged User View
[Use Cases]
sonic(config)# show vlan allVLAN ID: 300Route interface:Name: VLAN 300Tagged ports:Untagged ports: 0/0MAC-learning: enable
show {ip|ipv6} interfaces
Section titled “show {ip|ipv6} interfaces”[Command]
show {ip|ipv6} interfaces
[Purpose]
Display IP address configuration of VLAN interfaces.
[View]
Privileged User View
[Use Cases]
sonic# show ip interfacesInterface Master IPv4 address/mask Admin/Oper BGP Neighbor Neighbor IP----------- -------- ------------------- ------------ -------------- -------------0/48 199.0.3.1/24 up/up N/A N/Aloopback0 10.1.0.34/32 up/up N/A N/Avlan100 Vrf123 100.100.0.1/24 up/up N/A N/Avlan200 Vrf123 200.200.0.1/24 up/up N/A N/Avlan300 Vrf123 200.230.0.1/24 up/down N/A N/Avlan400 200.240.0.1/24 up/down N/A N/Avlan4094 99.0.0.1/24 up/up N/A N/Amgmt 10.250.0.138/24 up/up N/A N/A
show counters vlan
Section titled “show counters vlan”[Command]
show counters vlan
[Purpose]
Display VLAN interfaces statistics.
[View]
Privileged User View
[Notes]
Only supported on CX308P-48Y-N-V2 and CX532P-N-V2 (support two VLANIFs at most), other models are not supported yet. Run command clear counters vlan to clear VLANIFs statistics.
[Use Cases]
sonic# show counters vlanVLAN NAME PACKETS IN PACKETS OUT----------- ------------ -------------vlan1011 100 100vlan1012 0 0
VLAN Config
Section titled “VLAN Config”Table 8 VLAN Config
Command | Purpose |
---|---|
vlan vlan-id | Create a VLAN and enter VLAN Configuration View. |
description description | Specify the description for the VLAN. |
mac-address learning | Enable MAC learning for the VLAN. |
{broadcast|unknown-multicast|unknown-unicast} {drop|flood} | Set BUM suppression. |
counter enable | Enable VLAN interfaces statistics. |
interface vlan vlan-id | Enter VLANIF Configuration View. |
ip address {A.B.C.D/M|A::B/M} [secondary] | Configure IP address for the VLAN interface. |
mtu mtu | Configure the MTU value on a VLAN interface. |
shutdown | Bring the VLANIF down administratively. |
mac_address HH:HH:HH:HH:HH:HH | Specify a MAC address to the VLAN interface. |
switchport {trunk|access} vlan vlan-id | Add member port to the VLAN. |
vlan range vlan-list | Create a bulk of VLANs. |
switchport trunk range vlan vlan-list | Add member port to a bulk of VLANs. |
vlan vlan-id
Section titled “vlan vlan-id”[Command]
vlan vlan-id
[Purpose]
Create a VLAN and enter VLAN Configuration View.
[Parameters]
Parameter | Description |
---|---|
vlan-id | VLAN ID, the range is [1,4094]. |
[View]
Global Configuration View
[Notes]
Run command no vlan vlan-id to delete the VLAN
[Use Cases]
sonic# configure terminalsonic(config)# vlan 300sonic(config-vlan-300)# show this!vlan 300
description description
Section titled “description description”[Command]
description description
[Purpose]
Specify the description for the VLAN.
[Parameters]
Parameter | Description |
---|---|
description | In string form. |
[View]
VLAN Configuration View
[Notes]
Run command no description to delete description.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 200sonic(config-vlan-200)# description vlan-200sonic(config-vlan-200)# do show vlan 200VLAN ID: 200Description: vlan-200Route interface:Name: VLAN 200Tagged ports:Untagged ports:MAC-learning: enable
mac-address learning
Section titled “mac-address learning”[Command]
mac-address learning
[Purpose]
Enable MAC learning for the VLAN.
[View]
VLAN Configuration View
[Notes]
MAC learning is enabled by default. Run command no mac-address learning to disable MAC learning for the VLAN.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 300sonic(config-vlan-300)# no mac-address learningsonic(config-vlan-300)# show this!vlan 300 no mac-address learning
{broadcast|unknown-multicast|unknown-unicast} {drop|flood}
Section titled “{broadcast|unknown-multicast|unknown-unicast} {drop|flood}”[Command]
{broadcast|unknown-multicast|unknown-unicast} {drop|flood}
[Purpose]
Set BUM suppression.
[View]
VLAN Configuration View
[Notes]
By default, the policy for BUM messages is flooding.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 10sonic(config-vlan-10)# broadcast drop
counter enable
Section titled “counter enable”[Command]
counter enable
[Purpose]
Enable VLAN interfaces statistics.
[View]
VLAN Configuration View
[Notes]
Only supported on CX308P-48Y-N-V2 and CX532P-N-V2 (support two VLANIFs at most), other models are not supported yet. Run command no counter enable to disable VLAN interfaces statistics.
[Use Cases]
sonic# configure terminalsonic(config)# vlan 10sonic(config-vlan-10)# counter enable
interface vlan vlan-id
Section titled “interface vlan vlan-id”[Command]
interface vlan vlan-id
[Purpose]
Enter VLANIF Configuration View
[Parameters]
Parameter | Description |
---|---|
vlan-id | VLAN ID, the range is [1,4094]. |
[View]
Global Configuration View
[Notes]
Run command no interface vlan vlan-id to delete VLAN interface. You should remove the member ports from it before deleting.
[Use Cases]
sonic# configure terminalsonic(config)# interface vlan 300sonic(config-vlanif-300)#
ip address {A.B.C.D/M|A::B/M} [secondary]
Section titled “ip address {A.B.C.D/M|A::B/M} [secondary]”[Command]
ip address {A.B.C.D/M|A::B/M} [secondary]
[Purpose]
Configure IP address for the VLAN interface.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D/M | IPv4 address with prefix length. |
A::B/M | IPv6 address with prefix length. |
secondary | The default is Primary IP, specifying this option means configuring as Secondary IP, which requires that the Secondary IP and Primary IP be in the same network segment. |
[View]
VLANIF Configuration View
[Notes]
IPv4 address with subnet mask /32 is not allowed to be configured. Addresses with subnet mask /31 is allowed. In other subnet masks, addresses with the host portion all-zeros or all-ones are not allowed. IPv6 address with subnet mask /127 or /128 is not allowed to be configured. In other subnet masks, addresses with the host portion all-zeros are not allowed, but all-ones are allowed. Run command no ip address {A.B.C.D/M|A::B/M} [secondary] to delete IP address configuration of the VLAN interface.
[Use Cases]
sonic# configure terminalsonic(config)# interface vlan 300sonic(config-vlanif-300)# ip address 3.3.3.6/24sonic(config-vlanif-300)# show this!vlan 300ip address 3.3.3.6/24
mtu mtu
Section titled “mtu mtu”[Command]
mtu mtu
[Purpose]
Configure the MTU value on a VLAN interface.
[Parameters]
Parameter | Description |
---|---|
mtu | Maximum Transmission Unit, the range is from 1312 to 9216. The default is 9216 Bytes. |
[View]
VLANIF Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# interface vlan 300sonic(config-vlanif-300)# mtu 2000sonic(config-vlanif-300)# show this!vlan 300 mtu 2000
shutdown
Section titled “shutdown”[Command]
shutdown
[Purpose]
Bring the VLANIF down administratively.
[View]
VLANIF Configuration View
[Notes]
Run command no shutdown to bring the VLANIF up administratively.
[Use Cases]
sonic# configure terminalsonic(config)# interface vlan 300sonic (config-vlanif-3)# shutdownsonic (config-vlanif-3)# show this!interface vlan 300 shutdown
mac_address HH:HH:HH:HH:HH:HH
Section titled “mac_address HH:HH:HH:HH:HH:HH”[Command]
mac_address HH:HH:HH:HH:HH:HH
[Purpose]
Specify a MAC address to the VLAN interface.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address, not case sensitive. |
[View]
VLANIF Configuration View
[Notes]
The default is the MAC of the switch; Run command no mac_address to restore the MAC of the VLAN interface to default.
[Use Cases]
sonic# configure terminalsonic(config)# interface vlan 300sonic(config-vlanif-300)# mac-address 18:17:25:37:67:afsonic(config-vlan-300)# show this!vlan 300 mac-address 18:17:25:37:67:af
switchport {trunk|access} vlan vlan-id
Section titled “switchport {trunk|access} vlan vlan-id”[Command]
switchport {trunk|access} vlan vlan-id
[Purpose]
Add member port to the VLAN.
[Parameters]
Parameter | Description |
---|---|
access | Add to VLAN as untagged. |
trunk | Add to VLAN as tagged. |
vlan-id | VLAN ID, the range is [1,4094]. |
[View]
Physical Interface Configuration View/LAGIF Configuration View
[Notes]
An interface can only be added to one VLAN as untagged, but it can be added to multiple VLANs as tagged. The VLAN ID of the untagged VLAN will be set as PVID of the interface; Run command no switchport vlan vlan-id to remove the interface from specified VLAN; Run command no switchport to remove the interface from all VLANs and change to Layer 3 port.
[Use Cases]
sonic# configure terminalsonic(config)# interface ethernet 0/0sonic(config-if-0/0)# switchport access vlan 300sonic(config-if-0/0)# show this!interface ethernet 0/0 switchport access vlan 300
vlan range vlan-list
Section titled “vlan range vlan-list”[Command]
vlan range vlan-list
[Purpose]
Create a bulk of VLANs.
[Parameters]
Parameter | Description |
---|---|
vlan-list | Use ’-’ and ’,’ to separate VLAN ids e.g. 1-20,30,40 |
[View]
Global Configuration View
[Notes]
Run command no vlan range vlan-list to delete VLANs.
[Use Cases]
sonic# configure terminalsonic(config)# vlan range 10-20,4000
switchport trunk range vlan vlan-list
Section titled “switchport trunk range vlan vlan-list”[Command]
switchport trunk range vlan vlan-list
[Purpose]
Add member port to a bulk of VLANs.
[Parameters]
Parameter | Description |
---|---|
vlan-list | Use ’-’ and ’,’ to separate VLAN ids e.g. 1-20,30,40 |
[View]
Physical Interface Configuration View/LAGIF Configuration View
[Notes]
Run command no switchport vlan range vlan-list to remove member port from a bulk of VLANs.
[Use Cases]
sonic# configure terminalsonic(config)# interface ethernet 0/4sonic(config-if-0/4)# switchport trunk range vlan 10-20,4000
MAC View
Section titled “MAC View”Table 9 MAC View
Command | Purpose |
---|---|
show mac-address [{ethernet|link-aggregation} interface_name|all] | Display MAC address table. |
clear mac-address [{ethernet|link-aggregation} interface_name|vlan vlan-id] {static|dynamic|all} | Clear MAC entries. |
show mac-limit | Display MAC limit configuration. |
show mac-address [{ethernet|link-aggregation} interface_name|all]
Section titled “show mac-address [{ethernet|link-aggregation} interface_name|all]”[Command]
show mac-address [{ethernet|link-aggregation} interface_name|all]
[Purpose]
Display MAC address table.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
Privileged User View
[Use Cases]
sonic# show mac-address No. Vlan MacAddress Port Type----- ------ ----------------- --------- --------- 1 100 E2:8C:56:85:4A:11 0/0 StaticTotal number of entries 1sonic# show mac-address all No. Vlan MacAddress Port Type----- ------ ----------------- ----------- ------- 1 200 AA:BB:CC:11:22:33 0/129 DynamicTotal number of entries 1+--------+-------------------+--------------+-------+--------+| VLAN | MAC | RemoteVTEP | VNI | Type |+========+===================+==============+=======+========+| 200 | 60:EB:5A:01:10:B1 | 10.193.2.102 | 200 | Static |+--------+-------------------+--------------+-------+--------+
Total count : 1Aging time for switch is 1800 seconds
clear mac-address [{ethernet|link-aggregation} interface_name|vlan vlan-id] {static|dynamic|all}
Section titled “clear mac-address [{ethernet|link-aggregation} interface_name|vlan vlan-id] {static|dynamic|all}”[Command]
clear mac-address [{ethernet|link-aggregation} interface_name|vlan vlan-id] {static|dynamic|all}
[Purpose]
Clear MAC entries.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
vlan-id | VLAN ID, the range is [1,4094]. |
[View]
Privileged User View
[Use Cases]
sonic# clear mac-address dynamic
show mac-limit
Section titled “show mac-limit”[Command]
show mac-limit
[Purpose]
Display MAC limit configuration.
[View]
Privileged User View
[Use Cases]
sonic# show mac-limitInterface Mac-limit----------- -----------0/1 1000/2 200
MAC Config
Section titled “MAC Config”Table 10 MAC Config
Command | Purpose |
---|---|
mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id {ethernet|link-aggregation} interface_name | Configure a static MAC entry. |
mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id blackhole | Configure a blackhole MAC entry. |
mac-address timer {aging aging-time|no-aging} | Set MAC aging time. |
mac-limit dynamic mac-limit-value | Set a limit to the number of dynamic MAC table entries. |
mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id {ethernet|link-aggregation} interface_name
Section titled “mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id {ethernet|link-aggregation} interface_name”[Command]
mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id {ethernet|link-aggregation} interface_name
[Purpose]
Configure a static MAC entry.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address. |
vlan-id | VLAN ID, the range is [1,4094]. |
interface_name | Interface name (eg.0/1) |
[View]
Global Configuration View
[Notes]
Run command no mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id to delete a static MAC entry.
[Use Cases]
sonic# configure terminalsonic(config)# mac-address static aa:aa:aa:aa:aa:aa vlan 4 ethernet 0/4
mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id blackhole
Section titled “mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id blackhole”[Command]
mac-addressstatic HH:HH:HH:HH:HH:HH vlan vlan-id blackhole
[Purpose]
Configure a blackhole MAC entry.
[Parameters]
Parameter | Description |
---|---|
HH:HH:HH:HH:HH:HH | MAC address. |
vlan-id | VLAN ID, the range is [1,4094]. |
[View]
Global Configuration View
[Notes]
Run command no mac-address static HH:HH:HH:HH:HH:HH vlan vlan-id to delete a blackhole MAC entry.
[Use Cases]
sonic# configure terminalsonic(config)# mac-address aa:bb:bb:bb:bb:bb vlan 5 blackhole
mac-address timer {aging aging-time|no-aging}
Section titled “mac-address timer {aging aging-time|no-aging}”[Command]
mac-address timer {aging aging-time|no-aging}
[Purpose]
Set MAC aging time.
[Parameters]
Parameter | Description |
---|---|
aging-time | Specify the aging time in seconds, the default is 1800, and the range is from 30 to 7200. |
[View]
Global Configuration View
[Notes]
MAC aging time is a parameter that affects MAC self-learning on the switch. Dynamic MAC entries will be automatically discarded after aging; and static MAC entries are not affected by MAC aging time. Run command mac-address timer no-aging to disable MAC aging.
[Use Cases]
sonic# configure terminalsonic(config)# mac-address timer aging 3600sonic(config)# mac-address timer no-aging
mac-limit dynamic mac-limit-value
Section titled “mac-limit dynamic mac-limit-value”[Command]
mac-limit dynamic mac-limit-value
[Purpose]
Set a limit to the number of dynamic MAC table entries.
[Parameters]
Parameter | Description |
---|---|
mac-limit-value | The range is from 1 to 131072. |
[View]
VLAN Configuration View/Physical Interface Configuration View
[Notes]
Only CX308P-48Y-N-V2 and CX532P-N-V2 support this feature. Only VLAN or VLAN member ports are allowed to configure the MAC number limit. Run command no mac-limit dynamic to delete MAC limit configuration.
[Use Cases]
sonic# configure terminalsonic(config)# interface ethernet 0/0sonic(config-if-0/0)# mac-limit dynamic 1000sonic(config-if-0/0)# exitsonic(config)# vlan 30sonic(config-vlan-30)# mac-limit dynamic 2000
DHCP Relay
Section titled “DHCP Relay”DHCP Relay View
Section titled “DHCP Relay View”Table 11 DHCP Relay View
Command | Purpose |
---|---|
show dhcp_relay | Display DHCP Relay configuration. |
show dhcp_relay
Section titled “show dhcp_relay”[Command]
show dhcp_relay
[Purpose]
Display DHCP Relay configuration.
[View]
Privileged User View
[Use Cases]
sonic# show dhcp_relay+------------------------------+-------------+-----------+------------+----------+--------+| Name | down link | up link | loopback | server | vrf |+==============================+=============+===========+============+==========+========+| test__v4(v4) | NA | NA | NA | NA | NA |+------------------------------+-------------+-----------+------------+----------+--------+| test_dhcp_over_vxlan__v4(v4) | vlan20 | 0/2 | NA | 21.0.0.2 | vrf 123|+------------------------------+-------------+-----------+------------+----------+--------+| test_dhcp_over_vxlan__v6(v6) | vlan20 | 0/2 | NA | 2123::2 | vrf 123|+------------------------------+-------------+-----------+------------+----------+--------+
DHCP Relay Config
Section titled “DHCP Relay Config”Table 12 DHCP Relay Config
Command | Purpose |
---|---|
feature dhcp state enable | Enable feature DHCP. |
dhcp-relay name {v4|v6} [vrf vrf_name] | Create an IPv4 or IPv6 DHCP Relay instance. |
downlink vlan vlan-id [giaddr A.B.C.D | option82_sub5 A.B.C.D] | Specify the VLAN for DHCP Relay (on DHCP Client side). |
giaddr loopback loopback-id | Specify the gateway IP address. |
server dhcp_server_ip | Set DHCP Server IP. |
uplink {ethernet|link-aggregation|vlan} interface_name | Specify the uplink port ( on DHCP Server side) of DHCP Relay. |
feature dhcp state enable
Section titled “feature dhcp state enable”[Command]
feature dhcp state enable
[Purpose]
Enable feature DHCP.
[View]
Global Configuration View
[Notes]
Run command feature dhcp state disable to disable DHCP feature.
[Use Cases]
sonic# configure terminalsonic(config)# feature dhcp state enable
dhcp-relay name {v4|v6} [vrf vrf_name]
Section titled “dhcp-relay name {v4|v6} [vrf vrf_name]”[Command]
dhcp-relay name {v4|v6} [vrf vrf_name]
[Purpose]
Create an IPv4 or IPv6 DHCP Relay instance.
[Parameters]
Parameter | Description |
---|---|
name | Name of DHCP Relay instance. |
vrf_name | VRF name, specifying the VRF where the DHCP Relay instance is located |
[View]
Global Configuration View
[Notes]
Please run feature dhcp state enable to enable DHCP before you configure DHCP Relay.
[Use Cases]
sonic# configure terminalsonic(config)# dhcp-relay test v4
downlink vlan vlan-id [giaddr A.B.C.D | option82_sub5 A.B.C.D]
Section titled “downlink vlan vlan-id [giaddr A.B.C.D | option82_sub5 A.B.C.D]”[Command]
downlink vlan vlan-id [giaddr A.B.C.D | option82_sub5 A.B.C.D]
[Purpose]
Specify the VLAN for DHCP Relay (on DHCP Client side).
[Parameters]
Parameter | Description |
---|---|
vlan-id | VLAN ID, the range is [1,4094]. |
giaddr | Relay agent address |
option82_sub5 | Set option82 |
[View]
DHCP Relay Instance Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# dhcp-relay test v4sonic(config-dhcp-relay-test)# downlink vlan 10 giaddr 10.0.0.1
giaddr loopback loopback-id
Section titled “giaddr loopback loopback-id”[Command]
giaddr loopback loopback-id
[Purpose]
Specify the gateway IP address.
[Parameters]
Parameter | Description |
---|---|
loopback-id | Loopback interface number, integer form, range from 0 to 999. |
[View]
DHCP Relay Instance Configuration View
[Notes]
By default, the switch will set the giaddr to the IP address of the host VLAN interface when it receives a DHCP request.
[Use Cases]
sonic(config)# dhcp-relay test v4sonic(config-dhcp-relay-test)# giaddr loopback 0
server dhcp_server_ip
Section titled “server dhcp_server_ip”[Command]
server dhcp_server_ip
[Purpose]
Set DHCP Server IP.
[Parameters]
Parameter | Description |
---|---|
dhcp_server_ip | Specify the DHCP server IP address. |
[View]
DHCP Relay Instance Configuration View
[Use Cases]
sonic(config)# dhcp-relay test v4sonic(config-dhcp-relay-test)# server 10.248.0.1
uplink {ethernet|link-aggregation|vlan} interface_name
Section titled “uplink {ethernet|link-aggregation|vlan} interface_name”[Command]
uplink {ethernet|link-aggregation|vlan} interface_name
[Purpose]
Specify the uplink port ( on DHCP Server side) of DHCP Relay.
[Parameters]
Parameter | Description |
---|---|
interface_name | Interface name (eg.0/1) |
[View]
DHCP Relay Instance Configuration View
[Use Cases]
sonic(config)# dhcp-relay test v4sonic(config-dhcp-relay-test)# uplink ethernet 0/2
DHCP Server
Section titled “DHCP Server”DHCP Server View
Section titled “DHCP Server View”Table 13 DHCP Server View
Command | Purpose |
---|---|
show dhcp pool info [ip-version {v4|v6}] | Display DHCP Server pool information. |
show dhcp pool ip-use [ip-version {v4|v6}] | Display the address assigned to clients by DHCP Server. |
show dhcp pool expired [ip-version {v4|v6}] | Display DHCP Server expired ip information. |
show dhcp class | Display DHCP Server User Class configuration. |
show dhcp option-group | Display DHCP Server option group configuration. |
-
show dhcp pool info [ip-version {v4|v6}]
Section titled “show dhcp pool info [ip-version {v4|v6}]”
[Command]
show dhcp pool info [ip-version {v4|v6}]
[Purpose]
Display DHCP Server pool infomation.
[View]
Privileged User View
[Notes]
When no IP address version is specified, default view of IPv4 version address pool information
[Use Cases]
sonic# show dhcp pool info--------------------------------------------------Pool-name : t1Network : 201.0.0.0Mask : 255.255.255.0Lease : 201.0.0.20 - 201.0.0.50Lease_default_time : 600Lease_max_time : 7200Used Lease : 0Total Lease : 72
show dhcp pool ip-use [ip-version {v4|v6}]
Section titled “show dhcp pool ip-use [ip-version {v4|v6}]”[Command]
show dhcp pool ip-use [ip-version {v4|v6}]
[Purpose]
Display the addresses assigned to clients by DHCP Server.
[View]
Privileged User View
[Notes]
When no IP address version is specified, the default view is the IP address information assigned by the IPv4 version
[Use Cases]
sonic# show dhcp pool ip-in-use ip-version v4Reading leases from /var/lib/dhcp/dhcpd.leasesIP MAC hostname binding state starts ends==================================================================================================================total lease :0
show dhcp pool expired [ip-version {v4|v6}]
Section titled “show dhcp pool expired [ip-version {v4|v6}]”[Command]
show dhcp pool expired [ip-version {v4|v6}]
[Purpose]
Display DHCP Server expired ip information.
[View]
Privileged User View
[Notes]
When no IP address version is specified, the default view is the IP address information reclaimed by IPv4 version
[Use Cases]
sonic# show dhcp pool expiredReading leases from /var/lib/dhcp/dhcpd.leasesIP MAC hostname binding state starts ends==================================================================================================================201.0.0.35 18:17:25:37:64:40 -NA- free 2024-10-21 03:07:01 2024-10-21 03:09:07total lease :1
show dhcp class
Section titled “show dhcp class”[Command]
show dhcp class
[Purpose]
Display DHCP Server User Class configuration.
[View]
Privileged User View
[Use Cases]
sonic# show dhcp class!dhcp class t1!dhcp class test1 if-match rule 1 option 93 hex ffff
show dhcp option-group
Section titled “show dhcp option-group”[Command]
show dhcp option-group
[Purpose]
Display DHCP Server option group configuration.
[View]
Privileged User View
[Use Cases]
sonic# show dhcp option-group!dhcp option-group 1 option43 hex 01 force
DHCP Server Config
Section titled “DHCP Server Config”Table 14 DHCP Server Config
Command | Purpose |
---|---|
dhcp server | Enable interface DHCP Server function. |
dhcp pool name [v6] | Create a DHCP server address pool and enter the DHCP pool configuration view. |
dhcp class name | Create DHCP Server user class and enter DHCP user class configuration view. |
dhcp option-group id | Create a DHCP Server option group and enter the option group configuration view. |
network {A.B.C.D A.B.C.D|A::B A::B} | Configure the network of the address pool. |
address-pool start_ip end_ip | Configure address pool IP range. |
lease-time default_time max_time | Configure lease time. |
bootfile name | Configure bootfile option. |
dns {A.B.C.D|A::B} | Configure DNS option. |
next-server {A.B.C.D|A::B} | Configure next server option |
tftp-server {A.B.C.D|A::B} | Configure tftp server option |
capwap-ac A.B.C.D | Configure capwap-ac option |
routers A.B.C.D | Configure routers option |
option43 hex value force | Configure option43 option |
class name address-pool start_ip end_ip | Configure user class IP range |
class name option-group id | Bind class and option-group |
if-match rule rule_id option option_id | Create user class matching rule |
dhcp failover name | Enable DHCP Server failover |
adddress {A.B.C.D|loopback 0} | Configure failover local IP |
peer address A.B.C.D | Configure failover peer IP |
auto-partner-down time | Configure peer offline time |
max-response-delay time | Configure maximum communication interruption time |
role {primary|secondary} | Configure primary and secondary roles |
dhcp server
Section titled “dhcp server”[Command]
dhcp server
[Purpose]
Enable interface DHCP Server function.
[View]
Physical Interface / VLANIF Configuration View
[Notes]
Run command no dhcp server to disable interface DHCP Server fuction.
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1
dhcp pool name [v6]
Section titled “dhcp pool name [v6]”[Command]
dhcp pool name [v6]
[Purpose]
Create a DHCP server address pool and enter the DHCP pool configuration view.
[Parameters]
Parameter | Description |
---|---|
name | DHCP Server pool name. |
[View]
Global Configuration View
[Notes]
Default creation of IPv4 type address pool, with v6 parameter, creates IPv6 type address pool Run command no dhcp pool name [v6] to delete DHCP pool.
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1
dhcp class name
Section titled “dhcp class name”[Command]
dhcp class name
[Purpose]
Create DHCP Server user class and enter DHCP user class configuration view.
[Parameters]
Parameter | Description |
---|---|
name | DHCP Server class name. |
[View]
Global Configuration View
[Notes]
Run command no dhcp class name to delete DHCP class.
[Use Cases]
sonic# configure terminalsonic(config)# dhcp class t1
dhcp option-group id
Section titled “dhcp option-group id”[Command]
dhcp option-group id
[Purpose]
Create a DHCP Server option group and enter the option group configuration view.
[Parameters]
Parameter | Description |
---|---|
id | DHCP Server option group ID, with a value range of 1-65535. |
[View]
Global Configuration View
[Notes]
Run command no dhcp option-group id to delete DHCP option-group.
[Use Cases]
sonic# configure terminalsonic(config)# dhcp option-group 1
network {A.B.C.D A.B.C.D|A::B A::B}
Section titled “network {A.B.C.D A.B.C.D|A::B A::B}”[Command]
network {A.B.C.D A.B.C.D|A::B A::B}
[Purpose]
Configure the network of the address pool.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D A.B.C.D | IPv4 address and mask. |
A:;B A::B | IPv6 address and mask. |
[View]
DHCP pool Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# network 100.0.0.1 255.255.255.0
address-pool start_ip end_ip
Section titled “address-pool start_ip end_ip”[Command]
address-pool start_ip end_ip
[Purpose]
Configure address pool IP range.
[Parameters]
Parameter | Description |
---|---|
start_ip | Start_ip. |
end_ip | End_ip |
[View]
DHCP pool Configuration View
[Notes]
The end_ip address must be after the start_ip address
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# address-pool 100.0.0.10 100.0.0.100
lease-time default_time max_time
Section titled “lease-time default_time max_time”[Command]
lease-time default_time max_time
[Purpose]
Configure lease time.
[Parameters]
Parameter | Description |
---|---|
default_time | Default lease time, in seconds, with a value range greater than 300, default value is 600. |
max_time | The maximum lease time, in seconds, needs to be greater than the default lease time, the default value is 7200 |
[View]
DHCP pool Configuration View
[Notes]
Run command no lease-time to restore lease time to default value
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# lease-time 300 1000
bootfile name
Section titled “bootfile name”[Command]
bootfile name
[Purpose]
Configure bootfile option.
[Parameters]
Parameter | Description |
---|---|
name | File name. |
[View]
DHCP pool Configuration View/DHCP option-group Configuration View
[Notes]
Run command no bootfile to delete bootfile option
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# bootfile-name test.txt
dns {A.B.C.D|A::B}
Section titled “dns {A.B.C.D|A::B}”[Command]
dns {A.B.C.D|A::B}
[Purpose]
Configure DNS option.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
A::B | IPv6 address |
[View]
DHCP pool Configuration View/ DHCP option-group Configuration View
[Notes]
Run command no dns to delete DNS option
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# dns 8.8.8.8
next-server {A.B.C.D|A::B}
Section titled “next-server {A.B.C.D|A::B}”[Command]
next-server {A.B.C.D|A::B}
[Purpose]
Configure next-server option.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
A::B | IPv6 address |
[View]
DHCP pool Configuration View
[Notes]
Run command no next-server to delete next-server option
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# next-server 1.1.1.1
tftp-server {A.B.C.D|A::B}
Section titled “tftp-server {A.B.C.D|A::B}”[Command]
tftp-server {A.B.C.D|A::B}
[Purpose]
Configure tftp-server option.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
A::B | IPv6 address |
[View]
DHCP pool Configuration View/DHCP option-group Configuration View
[Notes]
Run command no tftp-server to delete tftp-server option
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# tftp-server 2.2.2.2
capwap-ac A.B.C.D
Section titled “capwap-ac A.B.C.D”[Command]
capwap-ac A.B.C.D
[Purpose]
Configure capwap-ac option.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
[View]
DHCP pool Configuration View/DHCP option-group Configuration View
[Notes]
Run command no capwap-ac to delete capwap-ac option
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# capwap-ac 3.3.3.3
routers A.B.C.D
Section titled “routers A.B.C.D”[Command]
routers A.B.C.D
[Purpose]
Configure routers option.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
[View]
DHCP pool Configuration View/DHCP option-group Configuration View
[Notes]
Only supports IPv4 addresses Run command no routers to delete routers option
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# routers 100.0.0.1
option43 hex value force
Section titled “option43 hex value force”[Command]
option43 hex value force
[Purpose]
Configure option43 option.
[Parameters]
Parameter | Description |
---|---|
value | Hexadecimal number. |
[View]
DHCP pool Configuration View/DHCP option-group Configuration View
[Notes]
Run command no option43 to delete routers option
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# option43 hex 10 force
class name address-pool start_ip end_ip
Section titled “class name address-pool start_ip end_ip”[Command]
class name address-pool start_ip end_ip
[Purpose]
Configure DHCP user class IP range.
[Parameters]
Parameter | Description |
---|---|
name | Class name |
start_ip | Start_ip |
end_ip | End_ip |
[View]
DHCP pool Configuration View
[Notes]
Run command no class name address-pool to delete DHCP user class IP range
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# class test1 address-pool 100.0.0.110 100.0.0.150
class name option-group id
Section titled “class name option-group id”[Command]
class name option-group id
[Purpose]
Bind class and option-group.
[Parameters]
Parameter | Description |
---|---|
name | Class name. |
id | Option-group ID |
[View]
DHCP pool Configuration View
[Notes]
Run command no class name option-group to unbind class and option-group
[Use Cases]
sonic# configure terminalsonic(config)# dhcp pool test1sonic(config-dhcp-pool-t1)# class test1 option-group 1
if-match rule rule_id option option_id
Section titled “if-match rule rule_id option option_id”[Command]
if-match rule rule_id option option_id
[Purpose]
Create user class matching rule.
[Parameters]
Parameter | Description |
---|---|
rule_id | Rule id, also indicating priority, with a value range of 1-16. The larger the value, the higher the priority. |
option_id | Option ID, currently only supports 82 and 93 |
[View]
DHCP class Configuration View
[Notes]
Run command no if-match rule rule_id to delete user class matching rule.
[Use Cases]
sonic# configure terminalsonic(config)# dhcp class test1sonic(config-dhcp-class-test1)# if-match rule 1 option 93 hex ffff
dhcp failover name
Section titled “dhcp failover name”[Command]
dhcp failover name
[Purpose]
Enable DHCP Server failover.
[Parameters]
Parameter | Description |
---|---|
name | Instance name. |
[View]
Global Configuration View
[Notes]
Run command no dhcp failover name to disable DHCP Server failover.
[Use Cases]
sonic# configure terminalsonic(config)# dhcp failover t456
adddress {A.B.C.D|loopback 0}
Section titled “adddress {A.B.C.D|loopback 0}”[Command]
adddress {A.B.C.D|loopback 0}
[Purpose]
Configure local IP.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
[View]
DHCP failover Configuration View
[Notes]
Run command no address to delete local IP
[Use Cases]
sonic# configure terminalsonic(config)# dhcp failover t456sonic(config-dhcp-failover-t456)# address 20.0.0.1
peer address A.B.C.D
Section titled “peer address A.B.C.D”[Command]
peer address A.B.C.D
[Purpose]
Configure peer IP.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
[View]
DHCP failover Configuration View
[Notes]
Run command no peer address to delete peer IP
[Use Cases]
sonic# configure terminalsonic(config)# dhcp failover t456sonic(config-dhcp-failover-t456)# peer address 20.0.0.2
auto-partner-down time
Section titled “auto-partner-down time”[Command]
auto-partner-down time
[Purpose]
Configure peer offline time.
[Parameters]
Parameter | Description |
---|---|
time | Peer offline time, in seconds and ranging from 1 to 3600. By default, peers will not go offline. |
[View]
DHCP failover Configuration View
[Notes]
Run command auto-partner-down to disable peer offline function
[Use Cases]
sonic# configure terminalsonic(config)# dhcp failover t456sonic(config-dhcp-failover-t456)# auto-partner-down 100
max-response-delay time
Section titled “max-response-delay time”[Command]
max-response-delay time
[Purpose]
Configure maximum communication interruption time.
[Parameters]
Parameter | Description |
---|---|
time | The maximum communication interruption time, measured in seconds, ranges from 30 to 3600, with a default value of 60. |
[View]
DHCP failover Configuration View
[Notes]
Run command nomax-response-delay to restore maximum communication time to default value
[Use Cases]
sonic# configure terminalsonic(config)# dhcp failover t456sonic(config-dhcp-failover-t456)# max-response-delay 100
role {primary|secondary}
Section titled “role {primary|secondary}”[Command]
role {primary|secondary}
[Purpose]
Configure primary and secondary roles.
[Parameters]
Parameter | Description |
---|---|
A.B.C.D | IPv4 address. |
[View]
DHCP failover Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# dhcp failover t456sonic(config-dhcp-failover-t456)# role primary