STP (Spanning Tree Protocol) is a protocol that prevents loops in a network by placing some of the switch ports in different states, such as blocking, listening, learning, forwarding, or disabled. A port in the blocking state does not forward frames or participate in frame forwarding. A network engineer can reconfigure STP to change the port states and avoid blocking ports that are needed for trunking.