What Is the Spanning Tree Protocol?

Spanning Tree Protocol ( STP ) is a second layer (data link layer) communication protocol that works in the OSI network model. The basic application is to prevent loops caused by redundant links in switches. It is used to ensure the loop-free logical topology in Ethernet. This avoids broadcast storms and occupies a lot of switch resources.

The working principle of the spanning tree protocol: If any switch has two or more links to the root bridge, the spanning tree protocol will cut one of them according to the algorithm and keep only one. This ensures that there is only one between any two switches. A single active link. Because this topology is generated, it is much like a tree structure with the root switch as the trunk, so it is a spanning tree protocol.
Spanning Tree Protocol ( STP ) is a second layer that works in the OSI network model (
The working process of STP is as follows: First, the election of the root bridge is based on the bridge ID generated by the combination of bridge priority and MAC address. The bridge with the smallest bridge ID will become the root bridge in the network ). Based on this, the distance from each node to the root bridge is calculated, and the cost of each redundant link is obtained from these paths. The smallest one becomes the communication path (the corresponding port state becomes forwarding), and the other becomes the backup path. (The corresponding port status becomes blocked). The communication tasks in the STP generation process are completed by BPDUs. This type of data packet is divided into configuration BPDUs (with a size not exceeding 35B) containing configuration information and notification BPDUs (with a length not exceeding 4B) containing topology change information.
STP port status
Port status Port capability
Disabled Do not send or receive any messages
Blocking Does not receive or forward data, receives but does not send BPDUs, and does not learn addresses
Listening Does not receive or forward data, receives and sends BPDUs, and does not learn addresses
Learning Does not receive or forward data, receives and sends BPDUs, and starts address learning
Forwarding Receive or forward data, receive and send BPDUs, and learn addresses
(1)
  • Intermediate system to intermediate system (IS-IS)
  • IEEE 802.1aq-shortest path bridging (SPB)

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?