IEEE 8021.d Spanning Tree Protocol (STP) was developed to stop routing loops in a network. If a router, switch, or hub has more than one path to the similar destination, a routing problem could happen. To stop this, the Spanning Tree Protocol is executed among the devices to detect and logically block redundant paths from the network. The major function of the Spanning Tree Protocol is to permit redundant network paths without suffering the effects of loops in the network.
The Spanning Tree Algorithm (STA) executed by STP prevents loops by calculating a stable Spanning Tree network topology. When forming fault tolerant internetworks, a loop-free path must exist among all Ethernet nodes in the network. Spanning Tree frames called Bridge Protocol Data Units (BPDUs) are sent and received by all switches in the network at regular intervals.