In the previous several lessons, we discuesed how the spanning tree protocol calculates the loop-free topology and how it works in a normal, stable situation. In this lesson, we will examine how the protocol behaves when a topology change occurs and it must reconverge.
Why switches need STP Topology Change Mechanism?
To understand the purpose of the STP topology change mechanism, let's examine a stable layer 2 network that forwrds frames. Two continuos processes take place:
- Switches learn MAC addresses.
- The root bridge sends configuration BPDUs.
The MAC address table
Switches learn MAC addresses from incoming frames and build their MAC address tables. It links MAC addresses to the ports they were learned from. It helps switches forward frames intelligently, without using the flood and learng behaviour. By default, an entry stays in the table for 300 seconds (5 minutes). If a host doesn't send any traffic for 5 minutes, its MAC address is removed from the MAC table.
In the diagram above, the STP topology is stable. SW4 is the root bridge. The link between switches SW1 and SW2 is blocked by spanning-tree. Each swtich's MAC address table shows that servers 1 and 2 are reachable through certain ports. Now let's see what happens when the link between SW3 and SW4 goes down.
When that happens, servers 1 and 2 lose connectivity to one another. Two problems prevent the servers from communicating right away via the redundant path, as shown in the diagram below.
- Problem 1. SW1 needs to move its blocked port (Eth0/2) to forwarding mode. With default STP settings, this typically takes 30-50 seconds to transition the port from blocking to listening, then to learning, and finally to forwarding state.
- Problem 2. Even after the port starts forwarding, SW1 still has MAC entry for server 2's address that points to SW3 (highlighted in red). Any frames sent to SW1 will be send to SW3 and be blackholed. The blackholing lasts until the MAC entries expire after 5 minutes.
This why the Spanning Tree protocol implements a topology change mechanism. After a change in the STP topology, switches are notified to lower their MAC address aging time. The new aging time is set to the Forward Delay value, which is 15 seconds by default. This allows switches to relearn the correct path quickly, without waitng for the default MAC table aging timer (5 minutes).
How does the STP Topology Change porcess solve this problem?
To solve the problem with the aging MAC address table, switches use a special process when a failure in the network is detected. At a high level the process looks like this:
- When a change happens, the switch that detects it informs the root bridge.
- The root bridge then broadcasts this information to the rest of the network.
- The switches react by lowering their MAC address aging timer to 15 seconds, which corresponds to the configured forwarding delay timer.
When something in the network changes, like a link going up or down, switches send a special message called a Topology Change Notification (TCN) BPDU. This message doesn’t carry details about what changed — it just tells other switches that something has changed.
A topology change occurs when a port becomes either active (up) or inactive (down). When that happens, the switch that detects the change sends a TCN BPDU out of its root port, as shown in the diagram below.
The switch continues to send TCN BPDUs at each hello interval until it receives an acknowledgment from the next upstream switch. Each switch along the path sends its own acknowledgment and forwards the TCN out of its root port. Since each switch's root port points in the direction of the root bridge, the TCN BPDU eventually reaches the root bridge. The following diagram shows how the TCN reaches the root in a topology with 11 switches.
Notice that this is an exagareted example. Layer 2 topologies with more than three or four switches are common in modern network designs. However, the example emphisezes the idea of how the TCN BPDU travels to the root bridge.
When the root bridge receives the topology change notification (TCN), it does not send back another TCN BPDU. Instead, it sets a special flag in its regular Configuration BPDU to notify all switches of the change, as shown in the diagram below.
Once all switches know a change has happened, they reduce their MAC address aging timer from the usual 300 seconds to just 15 seconds (the Forward Delay time). This helps clear out outdated MAC address entries faster, reducing the chance of traffic going to the wrong place. Switches continue to use this shorter aging time for 35 seconds (15 seconds of Forward Delay plus 20 seconds of Max Age). Active devices that continue to send traffic remain in the MAC table. Ones that are silent for 15 seconds or more are removed form the MAC table.
While the concept of a topology change is straightforward, seeing how it works in a real network can be more complex. If a switch link fails or a new one is added, it is essential to understand how all switches respond and whether users experience any downtime. Let's walk through some examples of different types of topology changes and see how STP responds, using the same network diagram shown earlier.
Topology Convergence Process
A direct topology change happens when a switch can immediately detect a problem on one of its ports. For example, if a trunk link between two switches goes down, both switches are immediately aware because the link is physically lost. This change in the network means other switches need to be informed.
We are going to use the following topology with four swtiches to go over the different topology change examples.

Notice how the switches behave while the topology is stable:
- The root bridge sends configuration BPDUs at regular interval of 2 seconds.
- Non-root switches relay those BPDUs on their designated ports.
- Root ports and blocked ports only receive BPDUs.
Full Content Access is for Registered Users Only (it's FREE)...
- Learn any CCNA, DevNet or Network Automation topic with animated explanation.
- We focus on simplicity. Networking tutorials and examples written in simple, understandable language for beginners.