The Spanning Tree Algorithm (STA) defines a number of states that a port under STP control will progress through before being in an active Forwarding state. 802.1D port states are as follows:
- Blocking – BPDUs received only (20 seconds)
- Listening – BPDUs sent and received (15 seconds)
- Learning – Bridging table is built (15 seconds)
- Forwarding – Sending/receiving data
- Disabled – Administratively down
A port moves through these states in the following manner:
- From initialisation to Blocking
- From Blocking to either Listening or Disabled
- From Listening to either Learning or Disabled
- From Learning to either Forwarding or Disabled
- From Forwarding to Disabled
STP timers are used in the process to control convergence:
- Hello – 2 seconds (time between each Configuration BPDU)
- Forward Delay – 15 seconds (controls durations of Listening/Learning states)
- Max Age – 20 seconds (controls the duration of the Blocking state)
Default convergence time is 30 to 50 seconds.
Spanning Tree Blocking State
A switch port that is in the Blocking state performs the following actions:
- Discards frames received on the port from the attached segment
- Discards frames switched from another port
- Does not incorporate station location into its address database
- Receives BPDUs and directs them to the system module
- Does not transmit BPDUs received from the system module
- Receives and responds to network management messages
Spanning Tree Listening State
The Listening state is the first transitional state that the port enters following the Blocking state. The port enters this state when STP determines that the port should participate in frame forwarding. A switch port that is in the Listening state performs the following actions:
- Discards frames received on the port from the attached segment
- Discards frames switched from another port
- Does not incorporate station location into its address database
- Receives BPDUs and directs them to the system module
- Receives, processes, and transmits BPDUs received from the system module
- Receives and responds to network management messages
Spanning Tree Learning State
The Learning state is the second transitional state the port enters. This state comes after the Listening state and before the port enters the Forwarding state. In this state, the port learns and installs MAC addresses into its forwarding table. A switch port that is in the Learning state performs the following actions:
- Discards frames received from the attached segment
- Discards frames switched from another port
- Incorporates (installs) station location into its address database
- Receives BPDUs and directs them to the system module
- Receives, processes, and transmits BPDUs received from the system module
- Receives and responds to network management messages
Spanning Tree Forwarding State
The Forwarding state is the final transitional state the port enters after the Learning state. A port in the Forwarding state forwards frames. A switch port that is in the Forwarding state performs the following actions:
- Forwards frames received from the attached segment
- Forwards frames switched from another port
- Incorporates (installs) station location information into its address database
- Receives BPDUs and directs them to the system module
- Processes BPDUs received from the system module
- Receives and responds to network management messages
Spanning Tree Disabled State
The Disabled state is not part of the normal STP progression for a port. Instead, a port that is administratively shut down by the network administrator, or by the system because of a fault condition, is considered to be in the Disabled state. A disabled port performs the following actions:
- Discards frames received from the attached segment
- Discards frames switched from another port
- Does not incorporate station location into its address database
- Receives BPDUs but does not direct them to the system module
- Does not receive BPDUs from the system module
- Receives and responds to network management messages