The port states in Spanning Tree define the role of a port in relation to its position in the Spanning Tree topology
These port states help ensure safe transitions, prevent loops, and allow network reconvergence after topology changes
Summary:
Blocking state - blocking state only receives BPDUs and does not forward traffic
Listening & Learning states - states only receive and forward BPDUs but does forward traffic
Learning state - learning state begins populating its MAC address table from incoming frames
Forwarding state - forwarding state sends traffic in addition to receiving and forwarding BPDUs
802.1D Port States:
Disabled
Blocking
Listening
Learning
Forwarding
802.1W Port States:
Discarding
Learning
Forwarding
Disabled State
Overview:
The disabled state is when a port is administratively shut down and not participating in the Spanning Tree domain
A port in the disabled state does not send or receive any traffic including BPDUs
This state is used when a port is intentionally turned off and should not participate in the STP domain
Blocking State
Overview:
A port in the blocking state does not forward traffic and only listens for BPDUs to detect for any changes in the network topology
A port in the blocking state remains in this state to prevent loops on the network
Blocking a port helps ensure that only one path is active between two switches, while backup paths remain blocked until needed
Listening State
Overview:
The listening state is the phase where a port is checking for BPDUs before transitioning into either a Learning or Forwarding state
A listening state port does not forward traffic and only listens for BPDUs
The listening state allows a port to gather network topology information before any learning or forwarding of data begins
Learning State
Overview:
The learning state is when a port begins to learn MAC addresses but still does not forward traffic
This state is essential to allow ports to effectively begin forwarding packets immediately after transitioning into the forwarding state
Forwarding State
Overview:
The forwarding state is when a port actively forwards frames to and from the network
The forwarding state learns MAC addresses and forwards data
The forwarding state represents the port's active participation in the network
Discarding State
Overview:
The discarding state in 802.1w replaces the older states from 802.1D including the Blocking, Listening, and Disabled states
The discarding state is a non-forwarding state where a port does not forward traffic and is a simplified state used to prevent loops and ensure faster convergence when network changes occur on the network