OcNOS-DC : Layer 2 Guide : Layer 2 Command Reference : Fundamental Layer 2 Commands
Fundamental Layer 2 Commands
This chapter describes fundamental Layer 2 commands.
errdisable cause
Use this command to globally shut down a port when certain errors happen:
BPDU guard puts an interface configured for Spanning Tree Protocol (STP) Port Fast into the ErrDisable state upon receipt of a STP BPDU to avoid a potential bridging loop.
If one side of a link-access group (LAG) is configured as a static LAG and the other side as a dynamic LAG, the ports on the side receiving LACP BPDUs go into the ErrDisable state
Note: When link-flap ErrDisable is enabled globally, then all interfaces are enabled. Link-flap ErrDisable can be enabled globally, but disabled for a specific interface with the no link-flap errdisable command.
Note: Stp-Bpdu-Guard is enabled by default on the global level configuration.
Use no form of this command to not shut down a port when certain errors happen.
Command Syntax
errdisable cause {stp-bpdu-guard|lag-mismatch|link-flap}
no errdisable cause {stp-bpdu-guard|lag-mismatch|link-flap}
Parameters
stp-bpdu-guard
ErrDisable on stp-bpdu-guard
lag-mismatch
ErrDisable on lag-mismatch
link-flap
ErrDisable on link-flap
Default
No default value is specified
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#errdisable cause lag-mismatch
errdisable link-flap-setting
Use this command to configure the link-flap errdisable feature:
An interface should change state as up-down to complete one cycle of a link flap.
The LED does not glow when an interface is in the errdisable state.
Errdisable is supported only on physical interfaces.
A LAG interface does not go into the errdisable state when all of its member ports are in the errdisable state
The error disable computation is based on a sliding window of time. The window size is configurable in seconds. This window is taken as the current time to the last <t> second, where <t> is the configured window size. If the accumulated link flap count reaches the maximum flap count for a particular sliding window, a link flap error disable fault is triggered.
Note: Any previous flapping accumulated is flushed when you execute this command.
Command Syntax
errdisable link-flap-setting max-flaps <1-100> time <1-1800>
Parameters
<1-100>
Maximum flap count
<1-1800>
Sliding window size in seconds
Default
Five flaps in ten seconds:
Maximum flap count: 5
Sliding window size: 10 seconds
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#errdisable link-flap-setting max-flaps 5 time 20
errdisable timeout
Use this command to set the ErrDisable auto-recovery timeout interval.
Command Syntax
errdisable timeout interval <10-1000000>
Parameters
<10-1000000>
Timeout interval in seconds
Default
By default, zero: timer is disabled
Command Mode
Configure mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#configure terminal
(config)#errdisable timeout interval 1000
show errdisable details
Use this command to display ErrDisable settings.
Command Syntax
show errdisable details
Parameters
None
Default
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show errdisable details
show interface errdisable status
Use this command to display ErrDisable conditions for an interface.
Command Syntax
show interface errdisable status
Parameters
None
Default
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show interface errdisable status
ge1 lag-mismatch-errdisable
ge2 stp-bpdu-guard-errdisable
show running-config switch
Use this command to display the running system switch configuration.
Command Syntax
show running-config switch bridge
show running-config switch dot1x
show running-config switch gmrp
show running-config switch gvrp
show running-config switch lacp
show running-config switch lmi
show running-config switch mstp
show running-config switch radius-server
show running-config switch rpsvt+
show running-config switch rstp
show running-config switch ptp
show running-config switch stp
show running-config switch synce
show running-config switch vlan
Parameters
bridge
Display Bridge group information.
dot1x
Display 802.1x port-based authentication information.
gmrp
Display GARP Multicast Registration Protocol (GMRP) information.
gvrp
Display GARP VLAN Registration Protocol (GVRP) information.
lacp
Display Link Aggregation Control Protocol (LACP) information.
lmi
Display Ethernet Local Management Interface Protocol (LMI) information.
mstp
Display Multiple Spanning Tree Protocol (MSTP) information.
radius-server
Display RADIUS server information.
rpvst+
Display Rapid Per-VLAN Spanning Tree (rpvst+) information.
rstp
Display Rapid Spanning Tree Protocol (RSTP) information.
ptp
Display Precision time Protocol (PTP)
stp
Display Spanning Tree Protocol (STP) information.
synce
Display synce information.
vlan
Display values associated with a single VLAN.
Default
None
Command Mode
Privileged exec mode, configure mode, router-map mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
(config)#show running-config switch stp
!
bridge 6 ageing-time 45
bridge 6 priority 4096
bridge 6 max-age 7
show tcp
Use this command to display the Transmission Control Protocol (TCP) connections details.
Command Syntax
show tcp
Parameters
None
Command Mode
Exec mode and privileged exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#show tcp
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 1 10.12.44.1:57740 127.0.0.1:705 CLOSE_WAIT
tcp 52 0 10.12.44.21:22 10.12.7.89:705 ESTABLISHED
tcp 85 0 10.12.44.21:57742 10.12.44.21:57738 ESTABLISHED
 
 
Table 1-4: Show tcp output 
Entry
Description
Proto
Protocol – TCP
Recv-Q
Number of TCP packets in the Receive Queue.
Send-Q
Number of TCP packets in the Send-Q.
Local Address and port number
Local IP address and the port number.
Foreign Address and port number
Foreign (received) IP address and the port number.
State
Current state of TCP connections:
 
ESTABLISHED
SYN_SENT
SYN_RECV
FIN_WAIT1
FIN_WAIT2
TIME_WAIT
CLOSE
CLOSE_WAIT
LAST_ACK
LISTEN
CLOSING
UNKNOWN
watch static-mac-movement
Use this command to watch if any MAC movement is detected over static MAC entries for a time period. Notification will be displaying if static MAC movement happens before the timer expires.
The counters can be validated with show interface cpu counters queue-stats for the L2 movement queue (Tx pkts and Dropped pkts columns).
Without enabling watch static-mac-movement, the statistics are reflected in the Rx EGR Port Unavail of show interface counters queue-drop-stats.
For VXLAN, watch static-mac-movement applies to all the MAC entries learned from the remote peer (remote dynamic or static remote), as these learned MACs are installed as static MAC entries in the hardware.
Command Syntax
watch static-mac-movement (<1-300>|)
Parameters
<1-300>
Timer value in seconds.
Default
By default, the timer is 10 seconds
Command Mode
Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
#watch static-mac-movement