Spanning Tree Protocol is defined by IEEE 802.1D. It prevents loops from being formed when switches or bridges are interconnected via multiple paths. Spanning Tree Protocol is implemented by switches exchanging BPDU messages with other switches to detect loops, which are removed by shutting down selected bridge interfaces. This algorithm guarantees that there is one …