The spanning tree protocol or the STP is the protocol used to resolve and eliminate the loops when there are multiple switches in a network..