show spanning-tree
Use this command to show the state of the spanning tree for all STP or RSTP bridge-groups, including named interface and VLANs.
Command Syntax
show spanning-tree
show spanning-tree interface IFNAME
show spanning-tree mst
show spanning-tree mst config
show spanning-tree mst interface IFNAME
show spanning-tree mst detail
show spanning-tree mst detail interface IFNAME
show spanning-tree mst instance (<1-63>) interface IFNAME
show spanning-tree mst instance (<1-63> | te-msti)
show spanning-tree statistics bridge <1-32>
show spanning-tree statistics interface IFNAME (instance (<1-63>)| vlan <2-4094>) bridge <1-32>
show spanning-tree statistics (interface IFNAME | (instance (<1-63>) | vlan <1-4094>)) bridge <1-32>
show spanning-tree vlan range-index
Parameters
interface
Display interface information
mst
Display MST information
statistics
Display statistics of the BPDUs
vlan range-index
Display a VLAN range-index value
config
Display configuration information
detail
Display detailed information
instance
Display instance information
<1-63>
Specify the instance identifier
te-msti
Display Traffic Engineering MSTI instance
<1-32>
Specify the bridge identifier
IFNAME
Display the interface name
<2-4094>
Specify a VLAN identifier, associated with the instance
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
The following is a sample output of this command displaying spanning tree information.
#show spanning-tree
% 1: Bridge up - Spanning Tree Enabled
% 1: Root Path Cost 0 - Root Port 0 - Bridge Priority 32768
% 1: Forward Delay 15 - Hello Time 2 - Max Age 20
% 1: Root Id 80000002b328530a
% 1: Bridge Id 80000002b328530a
% 1: last topology change Wed Nov 19 22:39:18 2008
% 1: 11 topology change(s) - last topology change Wed Nov 19 22:39:18 2008
% 1: portfast bpdu-filter disabled
% 1: portfast bpdu-guard disabled
% 1: portfast errdisable timeout disabled
% 1: portfast errdisable timeout interval 300 sec
%eth2: Ifindex 5 - Port Id 8005 - Role Designated - State Forwarding
%eth2: Designated Path Cost 0
%eth2: Configured Path Cost 200000 - Add type Explicit ref count 1
%eth2: Designated Port Id 8005 - Priority 128 -
%eth2: Root 80000002b328530a
%eth2: Designated Bridge 80000002b328530a
%eth2: Message Age 0 - Max Age 20
%eth2: Hello Time 2 - Forward Delay 15
%eth2: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 1 - topo change timer 0
%eth2: forward-transitions 4
%eth2: Version Rapid Spanning Tree Protocol - Received RSTP - Send RSTP
%eth2: No portfast configured - Current portfast off
%eth2: portfast bpdu-guard default - Current portfast bpdu-guard off
%eth2: portfast bpdu-filter default - Current portfast bpdu-filter off
%eth2: no root guard configured - Current root guard off
%eth2: Configured Link Type point-to-point - Current point-to-point
%eth1: Ifindex 4 - Port Id 8004 - Role Designated - State Forwarding
%eth1: Designated Path Cost 0
%eth1: Configured Path Cost 200000 - Add type Explicit ref count 1
%eth1: Designated Port Id 8004 - Priority 128 -
%eth1: Root 80000002b328530a
%eth1: Designated Bridge 80000002b328530a
%eth1: Message Age 0 - Max Age 20
%eth1: Hello Time 2 - Forward Delay 15
%eth1: Forward Timer 0 - Msg Age Timer 0 - Hello Timer 1 - topo change timer 0
%eth1: forward-transitions 4
%eth1: Version Rapid Spanning Tree Protocol - Received None - Send RSTP
%eth1: No portfast configured - Current portfast off
%eth1: portfast bpdu-guard default - Current portfast bpdu-guard off
%eth1: portfast bpdu-filter default - Current portfast bpdu-filter off
%eth1: no root guard configured - Current root guard off
%eth1: Configured Link Type point-to-point - Current point-to-point
%
%
The following is a sample output of this command displaying the state of the spanning tree for interface eth1.
#show spanning-tree interface eth1
% 1: Bridge up - Spanning Tree Enabled
% 1: Root Path Cost 0 - Root Port 0 - Bridge Priority 32768
% 1: Forward Delay 15 - Hello Time 2 - Max Age 20
% 1: Root Id 80000002b328530a
% 1: Bridge Id 80000002b328530a
% 1: last topology change Wed Nov 19 22:39:18 2008
% 1: 11 topology change(s) - last topology change Wed Nov 19 22:39:18 2008
% 1: portfast bpdu-filter disabled
% 1: portfast bpdu-guard disabled
% 1: portfast errdisable timeout disabled
% 1: portfast errdisable timeout interval 300 sec
% eth1: Ifindex 4 - Port Id 8004 - Role Designated - State Forwarding
% eth1: Designated Path Cost 0
% eth1: Configured Path Cost 200000 - Add type Explicit ref count 1
% eth1: Designated Port Id 8004 - Priority 128 -
% eth1: Root 80000002b328530a
% eth1: Designated Bridge 80000002b328530a
% eth1: Message Age 0 - Max Age 20
% eth1: Hello Time 2 - Forward Delay 15
% eth1: forward-transitions 4
% eth1: Version Rapid Spanning Tree Protocol - Received None - Send RSTP
% eth1: No portfast configured - Current portfast off
% eth1: portfast bpdu-guard default - Current portfast bpdu-guard off
% eth1: portfast bpdu-filter default - Current portfast bpdu-filter off
% eth1: no root guard configured - Current root guard off
Table 4-12 Explains the show command output fields.
Table 4-12: show spanning-tree interface output fields
Field | Description |
---|
Bridge up | A network bridge is a computer networking device that creates a single aggregate network from multiple communication networks or network segments. |
Root Path Cost | Root cost for the interface. |
Root Port | Interface that is the current elected root port for this bridge. |
Bridge Priority | Used for the common instance. |
Forward Delay | Configured time an STP bridge port remains in the listening and learning states before transitioning to the forwarding state. |
Hello Time | Configured number of seconds between transmissions of configuration BPDUs. |
Max Age | Maximum age of received protocol BPDUs. |
Port Id | Logical interface identifier configured to participate in the MSTP instance. |
Role Designated | Designated role for the packets in the interface. |
State Forwarding | State of the forwarding packets in the interface. |
Designated Path Cost | Designated cost for the interface. |
Configured Path Cost | Configured cost for the interface. |
Designated Port Id | Port ID of the designated port for the LAN segment this interface is attached to. |
Priority | Specify the port priority. |
Message Age | Number of seconds elapsed since the most recent BPDU was received. |
Forward Timer | The forward delay timer is the time interval that is spent in the listening and learning state. |
Msg Age Timer | The message age contains the length of time that has passed since the root bridge initially originated the BPDU. |
Received RSTP | Number of times the received the RSTP. |
Send RSTP | Number of times transmitted the RSTP. |