The learning state is a transitional STP port state. The port listens for BPDUs and learns MAC addresses from received frames, but it does not forward traffic. This prepares a root or designated port for forwarding while STP checks that the topology will not create a Layer 2 loop. section 14.4.1
Track the port’s behavior during STP convergence:
- A newly enabled port first enters listening, where STP determines its role. section 14.4.1
- A root or designated port then enters learning for 15 seconds by default. section 14.4.2
- If STP detects a topology change and the port becomes non-designated, it immediately returns to blocking. section 14.4.1
- After learning, the port enters forwarding and becomes fully operational. section 14.4.1
Table 14.2 STP port states (view table figure)
| State |
Forward frames? |
Learn MAC addresses? |
Stable or transitional? |
|---|---|---|---|
| Blocking (BLK) |
No |
No |
Stable (non-designated) |
| Listening (LIS) |
No |
No |
Transitional |
| Learning (LRN) |
No |
Yes |
Transitional |
| Forwarding (FWD) |
Yes |
Yes |
Stable (root, designated) |
Compare learning with blocking, listening, and forwarding by checking whether each state forwards frames, learns MAC addresses, and remains stable or transitional. section 14.4.1
Why PortFast matters
Without PortFast, a newly connected end host can wait 30 seconds while the port passes through listening and learning. PortFast moves an end-host port directly to forwarding, but it must not be used toward switches because bypassing these states can create Layer 2 loops. section 14.5.1 section 14.4.2
