In STP, the port states are as follows:
- Disabled: In this state, no frames are forwarded and no BPDUs are heard
- Blocking: In this state, no frames are forwarded but BPDUs are heard
- Listening: In this state, no frames are forwarded, but the port listens for frames
- Learning: In this state, no frames are forwarded but MAC addresses are learned by the switch
- Forwarding: In this state, frames are forwarded and MAC addresses are learned by the switch
The moment you connect a device to the LAN switch, the port goes through these stages, and the time it takes is as follows:
- From blocking to listening takes 20 seconds
- From listening to learning takes 15 seconds
- From learning to forwarding takes 15 seconds
In RSTP and MST, the port states are as follows:
- Discarding: In this state, frames are discarded
- Learning: In this frame, no frames are forwarded and MAC addresses are captured
- Forwarding: Frames are forwarded and MAC addresses are captured
The entire port state transition from discarding to forwarding should take a few seconds depending on the network topology and complexity.