Rapid Spanning Tree Protocol (RSTP) is a network protocol that ensures a loop-free topology for Ethernet networks. Nowadays it is a popular solution to implement redundant networks in critical systems for Energy, Aerospace or Factory Automation. This protocol is incorporated into IEEE 802.1Q-2014. RSTP provides faster convergence than 802.1D STP when topology changes occur. RSTP defines three port states: discarding, learning, and forwarding and five port roles: root, designated, alternate, backup, and disabled.
A RSTP capable switch determines what spanning tree will be computed by the algorithm, but the rules as written require knowledge of the entire network. This information is provided bridges use special data frames called Bridge Protocol Data Units (BPDUs) to exchange information about bridge IDs and root path costs. The switch device needs to manage BPDU in the proper way to ensure that the algorithm running on the CPU it is able to compute the algorithm.