STP Port States:- Blocking, Listing, Learning, and Forwarding
STP (Spanning Tree Protocol) is a layer two protocol. It finds and removes the switching loops from the network. A switching loop occurs when two switches have more than one direct connection between them. To prevent loops in the network, STP assigns ports to four states: blocking, listening, learning, and forwarding. During these states, the STP running switch learns the network topology, selects the root and designated ports, and disables the remaining ports to remove loops.
STP Blocking state
When you start an STP running switch, it does not enable its ports immediately. It keeps all ports in the blocking state for the first 20 seconds. In this period, it accepts and processes only BPDU messages. A BPDU contains the switch's priority ID, MAC address, and other necessary information. Switches use this information to elect the root bridge. Besides the BPDUs, it drops all other frames. From incoming BPDUs, it learns the network topology and determines which ports will function as root, designated, and blocked ports. After twenty seconds, only the root port and designated ports move into the next state. The remaining ports stay in this state.
STP Listening state
In this state, the switch double-checks the network topology to confirm that the ports it selected as root and designated ports do not form a loop. Ports remain in this state for the next fifteen seconds. During this state, ports listen and process only BPDUs. They do not process the user frames.
STP Learning state
In this state, ports start processing user frames. They use incoming frames to build the CAM table. However, they do not forward the incoming frames. Ports remain in this for another fifteen seconds.
STP Forwarding state
It is the final state of the STP operation. It is also called convergency. Only the root and designated ports reach this state. STP disables all remaining ports. In this state, ports listen and process both BPDUs and user frames. It uses BPDUs to monitor the network.

If any change occurs in the network, it repeats the same process on the affected ports.
STP Disabled State
It is a unique port state. STP uses it for all ports that do not participate in STP. Many reasons could prevent a port from participating in the STP operation. For example, an administrator may manually remove a port from STP operation for security reasons, the cable connected to the port may be unplugged, or the port may have no connection. In this case, STP does not send or receive any BPDUs.
This tutorial is part of the tutorial series "STP, RSTP, PVST, RPVST, and MSTP Explained with Examples". Other parts of this series are the following.
Chapter 01 Introduction and overview of STP and RSTP
Chapter 02 STP, RSTP, PVST, RPVST, and MSTP
Chapter 03 Similarities and Differences between STP and RSTP
Chapter 04 STP and RSTP Terminology
Chapter 05 STP/RSTP Timers Explained
Chapter 06 The Bridge ID and System ID Extension Explained
Chapter 07 PVST/STP Root Bridge Election Process Explained
Chapter 08 STP Port and Path Costs Explained
Chapter 09 STP Port States:- Blocking, Listing, Learning, and Forwarding
Chapter 10 STP - Spanning Tree Protocol Explained With Examples
Chapter 11 RSTP Port States and Types Explained
Chapter 12 PVST/RPVST and EtherChannel Explained
Chapter 13 RSTP / RPVST Explained with Examples
Conclusion
STP is essential for maintaining a loop-free and reliable network. By systematically transitioning ports through various states and dynamically responding to network changes, STP ensures optimal data flow and network stability.
By ComputerNetworkingNotes Updated on 2026-05-12