Spanning Tree Protocol : Verify Spanning tree

Verifying STP:

SW1#show spanning-tree
Displays STP information
SW1#show spanning-tree active
Displays STP information on active interfaces only
SW1#show spanning-tree bridge
Displays status and configuration of the STP
SW1#show spanning-tree detail
Displays a detailed summary of interface information
SW1#show spanning-tree
interface gigabitethernet 0/2
Displays STP information for interface gigabitethernet 0/2
SW1#show spanning-tree summary
Displays a summary of port states
SW1#show spanning-tree summary
Displays the total lines of the STP section
SW1#show spanning-tree vlan 10
Displays STP information for VLAN 10

Cisco STP Toolkit:

The following commands are not mandatory for the STP to work, you might find below these helpful to fine-tune your network.


fastethernet 0/10
Moves to interface configuration mode.
Enables PortFast on an access port.
portfast trunk
Enables PortFast on a trunk port.
portfast default
Globally enables PortFast on all switchports that are non-trunking.
SW1#show spanning-tree
interface fastethernet 0/10 portfast
Displays PortFast information on interface fastethernet 0/10.

 BPDU Guard:

portfast bpduguard default
Globally enables BPDU Guard on ports where portfast is enabled.
SW1(config)#interface range
fastethernet 0/1 - 4
Enters interface range configuration mode.
range)#spanning-tree portfast
Enables PortFast on all interfaces in the range.
#spanning-tree bpduguard enable
Enables BPDU Guard on the interface.
bpduguard disable
Disables BPDU Guard on the interface.
SW1(config)#errdisable recovery cause bpduguard
Allows port to re-enable itself if the cause of the error is BPDU Guard by setting a recovery timer.
SW1(config)#errdisable recovery interval 500
Sets recovery timer to 500 seconds. The default is 300 seconds. The range is from 30 to 86,400 seconds.
SW1#show spanning-tree
summary totals
It Verifies whether BPDU Guard is enabled or disabled.
SW1#show errdisable recovery
Displays errdisable recovery timer information.

Spanning-Tree Mode:

You can configure different types of spanning trees on a Cisco switch. The options vary according to the platform:
Per-VLAN Spanning Tree (PVST):
One instance of spanning tree exists for each VLAN with ISL trunking. This is a Cisco proprietary protocol.
One an instance of spanning tree exists for each VLAN with 802.1Q trunking. Also its Cisco proprietary. 
 Rapid PVST+:
This mode is the same as PVST+ except that it uses the rapid convergence based on the 802.1w standard.
The 802.1w is the Rapid Spanning Tree (RST) algorithm to multiple spanning trees. Multiple VLANs can map to the single instance of the RST. We have one condition, We cannot run MSTP and PVST at the same time.

mode mst
Enables MSTP.
mode pvst
Enables PVST+. This is the default setting for this mode.
mode rapid-pvst
Enables Rapid PVST+.

Extended System ID:

extend system-id
It Enables extended system ID, also known as MAC address reduction.
SW1#show spanning-tree summary
Verifies that extended system ID is enabled.
SW1#show spanning-tree bridge
Displays the extended system ID as part of the bridge ID.

Enabling Rapid Spanning Tree:

mode rapid-pvst
Enables Rapid PVST+.
SW1#show spanning-tree
Displays mode, root and bridge IDs, participating ports, and their spanning tree states.
SW1#show spanning-tree summary
It Displays summary of configured port states including spanning tree protocol mode.
SW1#show spanning-tree detail
Displays a detailed summary of spanning tree interface information including mode, priority, system ID, MAC address, timers, and role in the spanning tree for each VLAN and port.

Troubleshooting Spanning Tree:

SW1#debug spanning-tree all
Displays all spanning-tree debugging events
SW1#debug spanning-tree events
Displays spanning-tree debugging topology events
SW1#debug spanning-tree backbonefast
Displays spanning-tree debugging BackboneFast events
SW1#debug spanning-tree uplinkfast
Displays spanning-tree debugging UplinkFast event
SW1#debug spanning-tree mstp all
Displays all MST debugging events
SW1#debug spanning-tree switch state
Displays spanning-tree port state changes
SW1#debug spanning-tree pvst+
Displays PVST+ events

Post a Comment

Previous Post Next Post