show spantree stats

Use this command to display Spanning Tree information for one or more ports.

Syntax

show spantree stats [port port-string] [sid sid] [active]

Parameters

port port-string (Optional) Displays information for the specified port(s). For a detailed description of possible port-string values, refer to Port String Syntax Used in the CLI in the S-, K-, and 7100 Series Configuration Guide.
sid sid (Optional) Displays information for a specific Spanning Tree identifier. If not specified, SID 0 is assumed.
active (Optional) Displays information for ports that have received STP BPDUs since boot.

Defaults

  • If port-string is not specified, Spanning Tree information for all ports will be displayed.
  • If sid is not specified, information for Spanning Tree 0 will be displayed.
  • If active is not specified information for all ports will be displayed regardless of whether or not they have received BPDUs.

Mode

All command modes.

Example

This example shows how to display the device‘s Spanning Tree configuration:

System(rw)->show spantree stats
Spanning tree status         - enabled
Spanning tree instance       - 0
Designated Root MacAddr      - 00-e0-63-9d-c1-c8
Designated Root Priority     - 0
Designated Root Cost         - 10000
Designated Root Port         - lag.0.1
Root Max Age                 - 20 sec
Root Hello Time              - 2  sec
Root Forward Delay           - 15 sec
Bridge ID MAC Address        - 00-01-f4-da-5e-3d
Bridge ID Priority           - 32768
Bridge Max Age               - 20 sec
Bridge Hello Time            - 2  sec
Bridge Forward Delay         - 15 sec
Topology Change Count        - 7
Time Since Top Change        - 00 days 03:19:15
Max Hops                     - 20

show spantree Output Details shows a detailed explanation of command output.

Click to expand in new window

show spantree Output Details

Output... What it displays...
Spanning tree instance Spanning Tree ID.
Spanning tree status Whether Spanning Tree is enabled or disabled.
Designated Root MacAddr MAC address of the designated Spanning Tree root bridge.
Designated Root Port Port through which the root bridge can be reached.
Designated Root Priority Priority of the designated root bridge.
Designated Root Cost Total path cost to reach the root.
Root Max Age Amount of time (in seconds) a BPDU packet should be considered valid.
Root Hello Time Interval (in seconds) at which the root device sends BPDU (Bridge Protocol Data Unit) packets.
Root Forward Delay Amount of time (in seconds) the root device spends in listening or learning mode.
Bridge ID MAC Address Unique bridge MAC address, recognized by all bridges in the network.
Bridge ID Priority Bridge priority, which is a default value, or is assigned using the set spantree priority command. For details, refer to set spantree priority.
Bridge Max Age Maximum time (in seconds) the bridge can wait without receiving a configuration message (bridge “hello”) before attempting to reconfigure. This is a default value, or is assigned using the set spantree maxage command. For details, refer to set spantree maxage.
Bridge Hello Time Amount of time (in seconds) the bridge sends BPDUs. This is a default value, or is assigned using the set spantree hello command. For details, refer to set spantree hello.
Bridge Forward Delay Amount of time (in seconds) the bridge spends in listening or learning mode. This is a default value, or is assigned using the set spantree fwddelay command. For details, refer to set spantree fwddelay.
Topology Change Count Number of times topology has changed on the bridge.
Time Since Top Change Amount of time (in days, hours, minutes and seconds) since the last topology change.
Max Hops Maximum number of hops information for a particular Spanning Tree instance may traverse (via relay of BPDUs within the applicable MST region) before being discarded. This is a default value, or is assigned using the set spantree maxhops command. For details, refer to set spantree maxhops.

Example

This example shows how to display port-specific Spanning Tree information for port ge.1.1.

System(rw)->show spantree stats port ge.1.1
Spanning tree status         - enabled
Spanning tree instance       - 0
Designated Root MacAddr      - 00-e0-63-93-79-0f
Designated Root Priority     - 0
Designated Root Cost         - 0
Designated Root Port         - 0
Root Max Age                 - 20 sec
Root Hello Time              - 2  sec
Root Forward Delay           - 15 sec
Bridge ID MAC Address        - 00-e0-63-93-79-0f
Bridge ID Priority           - 0
Bridge Max Age               - 20 sec
Bridge Hello Time            - 2  sec
Bridge Forward Delay         - 15 sec
Topology Change Count        - 5
Time Since Top Change        - 00 days 03:16:54
Max Hops                     - 20
SID   Port         State              Role          Cost        Priority
---   ----------   ----------------   -----------   --------    --------
0     ge.1.1       Blocking           Disabled      20000       128
Port-Specific show spantree stats Output Details describes the port-specific information displayed.
Click to expand in new window

Port-Specific show spantree stats Output Details

Output... What it displays...
SID The Spanning Tree instance.
Port The port name.
State The Spanning Tree forwarding state of the port. This value can be Blocking, Forwarding, Listening, or Learning. If the port/SID has been placed in a non-forwarding state for a reason other than normal Spanning Tree protocol operation, an asterisk will be displayed next to the state. You can use the command show spantree nonforwardingreason to display the specific reason.
Role The Spanning Tree role of the port. The port role is assigned by the Spanning Tree protocol and determines the behavior of the port — either sending or receiving BPDUs, and forwarding or blocking data traffic.
Cost The port cost.
Priority The priority of the link in a Spanning Tree bridge. This value can be set with the command clear spantree portpri.