45Spanning tree configurationAs a Layer 2 management protocol, the Spanning Tree Protocol (STP) eliminates Layer 2 loops byselectively blocking redundant links in a network, putting them in a standby state, which still allows forlink redundancy.The recent versions of STP include the Rapid Spanning Tree Protocol (RSTP), Per VLAN Spanning Tree(PVST), and the Multiple Spanning Tree Protocol (MSTP).This chapter includes these sections:• STP• RSTP• PVST• MSTP• Protocols and standards• Spanning tree configuration task lists• Configuring the spanning tree• Displaying and maintaining the spanning tree• Spanning tree configuration examplesSTPSTP was developed based on the 802.1d standard of IEEE to eliminate loops at the data link layer in alocal area network (LAN). Networks often have redundant links as backups in case of failures, but loopsare a very serious problem. Devices that run STP detect loops in the network by exchanging informationwith one another, and eliminate loops by selectively blocking certain ports to prune the loop structureinto a loop-free tree structure. This avoids proliferation and infinite cycling of packets that would occur ina loop network, and prevents received duplicate packets from decreasing the performance of networkdevices.In the narrow sense, STP refers to IEEE 802.1d STP. In the broad sense, STP refers to the IEEE 802.1d STPand various enhanced spanning tree protocols derived from that protocol.STP protocol packetsSTP uses bridge protocol data units (BPDUs), also known as configuration messages, as its protocolpackets. This chapter uses BPDUs to represent all types of spanning tree protocol packets.STP-enabled network devices exchange BPDUs to establish a spanning tree. BPDUs contain sufficientinformation for the network devices to complete spanning tree calculation.STP uses the following types of BPDUs:• Configuration BPDUs—Used by network devices to calculate a spanning tree and maintain thespanning tree topology.• Topology change notification (TCN) BPDUs—Which notify network devices of the network topologychanges.