The Spanning Tree Protocol (STP) and its fast derivative the Rapid Spanning Tree Protocol (RSTP) are network protocols seeking to avoid loops in Ethernet networks. They are very important in the (correct) operation of a network because they help avoid broadcast storms and succeed in redundancy.
Spanning Tree Protocol (STP)
STP states & roles:
Port States:
1. Disabled: This port is administratively down.
2. Blocking: The port doesn’t forward frames, it only listens to BPDUs (Bridge Protocol Data Units).
3. Listening The Port is getting ready to start listening on the network. It listens to BPDUs to avoid loops but hasn’t started forwarding frames at this point.
4. Learning: The port starts learning MAC addresses but doesn’t forward frames yet.
5. Forwarding: This case does also what the store and forward did but not only this, it learns the mac from the frame itself and stores it on the whole structure.
6. Broken: This is a non-standard Spanning Tree Protocol (STP) state, used to represent a port in an abnormal state due to an error.
Port Roles:
1. Root Port (RP): Port with the best path to the root bridge Every non-root bridge has only one Root port.
2. Designated Port (DP) The port that is chosen to forward frames to the root bridge for each network segment.
3. Alternate Port: This is they back up for the root port and this is located in the RSTP.
4. Backup Port: The port you use only in RSTP, as a backup to the designated port
Rapid Spanning Tree protocol (RSTP)
RSTP : Repeated Spanning Tree protocol is a successor of STP with faster convergence. It introduces some changes, and new port types,
Port States:
1. Discard: This state combines the blocking, listening, and Disabled state of STP. The port will not and can only listen to BPDUs.
2. Port learns (same as learning) – add MAC addresses to its lookup table but does not forward frames.
3. Forwarding: The port forwards the frames and best for learning and MAC addresses.
Port Roles:
1. Root Port (RP): The port with the best path to the root bridge (Same as in STP.
2. Designated Port (Always the one with the lowest Prio** Same as in STP, the port that forwards frames towards the root bridge for each network segment.
3. Alternate Port: Alternative path to the root bridge, replaces root port should it fail.
4. Backup Port: Is used as an alternative if designated port fails This is a port on the same bridge and on the same network segment as the Designated port.
STP vs RSTP Comparison
- Convergence Time: RSTP is much faster at converging (within seconds) compared to STP (which can take 30-50 seconds)
- Port States: RSTP simplifies the port states down to three basic states: discarding, learning and forwarding.
- Port Roles: RSTP introduces alternate and backup port roles to allow rapid convergence in a new network, with consequent reduction of recovery times.
Practical Implications
- Loop Prevention: In redundant network topologies, both summer and rapid.ver STP to prevent the network loop, and then only one path exists between the two network devices.
- The primary differences with respect to STP are the following: – **Redundancy**: RSTP allows for faster recovery from link failures thanks to the extra port roles and fast convergence.
- Network Design: STP/RSTP should be properly implemented in order to design stronger and faster network topologies, especially in bigger or more complex ones.
Summary of Major Components of the Program
- All switches should support one protocol or the other (STP or RSTP).
- Configure bridge priorities and port costs to direct root bridge election and path selection.
- Monitoring and constantly updating changes in configurations for network adjustments & updated performance
These states and roles help network administrators construct and maintain reliable, loop-free network infrastructures that keep networks up and data flowing quickly.