STP - port states
In order to operate, Spanning Tree Protocol (STP) uses a series of port states that participating switch ports go through to ensure a loop-free layer 2 topology. The port states for the original IEEE 802.1D version of STP are:
- Blocking: This is the initial state of every port when the switch is powered on. In this state, the port will not forward frames, it will not learn MAC addresses, but it will listen to BPDU (Bridge Protocol Data Unit) messages that are received on the port.
- Listening: In this state, the port still isn't forwarding frames or learning MAC addresses, but it does process BPDUs. Based on the BPDUs, the switch is deciding whether the port should become root port or designated port, or continue to be blocked.
- Learning: In this state, the port is preparing to participate in frame forwarding. It still isn't forwarding frames, but it is learning MAC addresses to build its MAC address table.
- Forwarding: This is the normal state of a port. In this state, the port forwards frames and also learns MAC addresses.
- Disabled: This is not a part of the normal STP operation. This state happens when a port is administratively shut down. In this state, the port doesn't forward frames, doesn't learn MAC addresses and doesn't listen to BPDUs.
STP uses a particular method for transitioning between states, using timers. Port states should not be confused with STP - port roles.
Links
https://networklessons.com/spanning-tree/introduction-to-spanning-tree