



Verifying STP:





show spanning-tree SW1# Displays STP information show spanning-tree active SW1# Displays STP information on active interfaces only show spanning-tree bridge SW1# Displays status and configuration of the STP andof the show spanning-tree detail SW1# Displays a detailed summary of interface information show spanning-tree SW1# interface gigabitethernet 0/2 Displays STP information for interface gigabitethernet 0/2 show spanning-tree summary SW1# Displays a summary of port states show spanning-tree summary SW1# Totals Displays the total lines of the STP section show spanning-tree vlan 10 SW1# 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.





PortFast:





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





BPDU Guard :









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

protocol. One instance of spanning tree exists for each VLAN with ISL trunking. This is a Cisco proprietaryprotocol.

PVST+:

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.

MSTP:

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.



