clear spanning-tree

To delete all bridge and port level spanning tree statistics information, use the command clear spanning-tree in Global Configuration Mode.

For RSTP, the information contains number of:
  • Transitions to forwarding state
  • RSTP BPDU count received / transmitted
  • Config BPDU count received / transmitted
  • TCN BPDU count received / transmitted
  • Invalid BPDU count transmitted
  • Port protocol migration count
For MSTP, the information contains number of:
  • Port forward transitions
  • Port received BPDUs
  • Port transmitted BPDUs
  • Port invalid BPDUs received
  • Port protocol migration count
  • BPDUs sent / received for each MSTI
For PVRST, the information contains number of:
  • Transitions to forwarding state
  • PVRST BPDU count received / transmitted
  • Config BPDU count received / transmitted
  • TCN BPDU count received / transmitted
  • Port protocol migration count

clear spanning-tree

clear spanning-tree { mst } { <instance-id (1-64)> } { counters } { [interface } { interface-type } { <interface-id> }

Parameters

Parameter Type Description
mst   Enter to clear the statistical counters specific to the MSTP instance already created in the switch.
<instance-id (1-64)>   Enter a value for the MSTP instance already created in the switch. This value ranges from 1 to 64. The special value 4094 can be used only in the switch that supports PBB-TE. This special value represents PTETID that identifies VID used by ESPs. This option is applicable, only if the spanning tree mode is set as MST.
counters Integer Enter a number for maximum retries. The value ranges from 1 to 12.
interface   Enter to clear all port-level spanning-tree statistics information for the given port.
interface-type   Enter to clear all port-level spanning-tree statistics information for the specified type of interface. The interface can be:
  • fastethernet – Officially referred to as 100BASE-T standard. This is a version of LAN standard architecture that supports data transfer up to 100 Megabits per second.
  • gigabitethernet – A version of LAN standard architecture that supports data transfer up to 1 Gigabit per second.
  • extreme-ethernet – A version of Ethernet that supports data transfer up to 10 Gigabits per second. This Ethernet supports only full duplex links.
  • internal-lan – Internal LAN created on a bridge per IEEE 802.1ap.
  • port-channel – Logical interface that represents an aggregator which contains several ports aggregated together.
<interface-id>   Enter to clear a specific slot number / port number. The format is <0>/<1-28> without spaces between Slot Number/Port Number. For example, 0/1.

Mode

Global Configuration Mode

Prerequisites

The statistics information can be deleted, only if the spanning tree functionality has not been shut down in the switch. The type of spanning tree mode should be set, if the functionality is already shutdown.

Examples

iS5Comm(config)# clear spanning-tree counters interface gigabitethernet 0/1