STP/Rapid Spanning Tree Protocol (RSTP) is used to block redundant links on the Layer 2 network and trim a network into a loop-free tree topology.
On a complex network, loops are inevitable. With the requirement for network redundancy backup, network designers tend to deploy multiple physical links between two devices, one of which is the master and the others are the backup. Loops are likely or bound to occur in such a situation. Loops will cause broadcast storms, thereby exhausting network resources and paralyzing the network. Loops also cause flapping of MAC address tables and thus damages MAC address entries. STP/RSTP can be deployed on a network to eliminate loops. If a loop is detected, STP/RSTP blocks one port to eliminate the loop.
If the current device supports STP and RSTP, RSTP is recommended.