In preparation of your CCNA exam, we want to make sure we cover the various concepts that we could see on your Cisco CCNA exam. So to assist you, below we will discuss one of the more difficult CCNA concepts; Spanning Tree Protocol. As you progress through your CCNA exam studies, I am sure with repetition you will find this topic becomes easier. So even though it may be a difficult concept and confusing at first, keep at it as no one said getting your Cisco certification would be easy!


Spanning-Tree Protocol
The Spanning-Tree Protocol prevents looping traffic in a redundant switched network by blocking traffic on the redundant links. If the main link goes down, the spanning tree activates the standby path. Spanning-Tree Protocol operation is transparent to end stations. The Spanning-Tree Protocol was developed by DEC and was revised in the IEEE 802.1d specification. The two algorithms are incompatible. Catalyst switches use the IEEE 802.1d Spanning-Tree Protocol.
Spanning Tree Operation
Spanning-Tree Protocol assigns roles to switches and ports so that there is only one path through the switch network at any given time. This is accomplished by assigning a single root bridge, root ports for nonroot bridges, and a single designated port for each network segment. On the root bridge, all ports are designated ports. On the root bridge, all ports are set to the forwarding state. For the nonroot bridge, the root port is set to the forwarding state. (The switch might also have designated ports set to the forwarding state). The port with the lowest-cost path to the root bridge is chosen as the root port. One designated port is assigned on each segment. The bridge with the lowest-cost path to the root bridge is the designated port. Nondesignated ports are set to the blocking state (which does not forward any traffic).
Selecting the Root Bridge
Switches running the Spanning-Tree Protocol exchange information at regular intervals using a frame called the bridge protocol data unit (BPDU). Each bridge has a unique bridge ID. The bridge ID contains the bridge MAC address and a priority number. The midrange value of 32768 is the default priority. The bridge with the lowest bridge ID is selected as the root bridge. When switches have the same priority, the one with the lowest MAC address is the root bridge. In the figure, Switch X is the root bridge.
Port States
Frames take a finite amount of time to travel or propagate through the network. This delay is known as propagation delay. When a link goes down, spanning tree activates previously blocked links. This information is sent throughout the network, but not all switches receive this information at the same time. To prevent temporary loops, switches wait until the entire network is updated before they set any ports to the forwarding state. Each switch port in a network running the Spanning-Tree Protocol is in one of the following states:
Blocking
Listening
Learning
Forwarding
The forward delay is the time it takes for a port to go to a higher state. It usually takes 50 seconds for a port to go from the blocking state to the forwarding state (20 max age + 15 listening + 15 learning), but the timers can be adjusted.
Spanning-Tree Recalculation
When a link fails, the network topology must change. Connectivity is reestablished by placing key blocked ports in the forwarding state. In the figure, if switch X fails, switch Y does not receive the BPDU. If the BPDU is not received before the max age timer expires, spanning tree begins recalculating the network. In the figure, switch Y is now the root bridge. If switch X comes back up, spanning tree recalculates the network, and switch X is again the root bridge.
Time to Converge
A network is said to have converged when all ports in a switched network are in either the blocked or forwarding state after a topology change.
Spanning-Tree Protocol Summary
The Spanning-Tree Protocol prevents loops in a redundant network.
Spanning-Tree Protocol assigns a root bridge, root ports for nonroot bridges, and designated port segments. In a converged network, ports are either in forwarding or blocking state.
BPDUs are exchanged every two seconds. The bridge ID is made up of the MAC address and priority. The bridge with the lowest bridge ID is the root bridge.
The four port states are blocking, listening, learning, and forwarding.
When a link fails, spanning tree adjusts the network topology to ensure connectivity.

I hope you found this article to be of use and it helps you prepare for your Cisco CCNA certification. I am sure you will quickly find out that hands-on real world experience is the best way to cement the CCNA concepts in your head to help you pass your CCNA exam!