The Designated Port is responsible for forwarding traffic to and from the segment it represents. The Root Bridge is the central switch elected based on the lowest bridge ID.
BPDUs are messages exchanged between switches to share information about network topology, which STP uses to build and maintain the spanning tree.
STP's primary purpose is to prevent network loops that can occur in a redundant network topology. By blocking redundant paths, STP ensures that only one active path exists between any two devices in the network, thereby avoiding loops.
In the Forwarding state, a port can both forward data and learn MAC addresses. In the Blocking state, the port does not forward data. The Listening state is where the port is preparing to forward but does not yet forward traffic, and the Learning state is where the port learns MAC addresses but does not forward data.
The Root Bridge is determined by the switch with the lowest Bridge ID, which is a combination of the switch's bridge priority and MAC address.