When a topology change event occurs, processing BPDUs only isn’t enough, you may have some MAC entries in the CAM table that are probably invalid after the event. STP does not fill the CAM table with MAC entries, it’s only purpose is to maintain a loop free network environment.
In order for the CAM table to be updated two things must happen:
- All switches must be notified to time out their unused CAM entries
- Each switch must use a short timer equal to the forward delay timer to time out the unused CAM entries (15 sec)
Notifications of topology change events are sent using Topology Change Notifications (TCN) BPDUs. The TCN is sent to the current active root through its current and active root port:
Here is the process of the TCN BPDU notifying the root of a topology event:
- A topology event occurs on a port of a switch
- After the switch detects the event, it sends a TCN BPDU out it’s Root Port and repeats this message every Hello interval until it’s acknowledged
- The next upstream switch receiving the TCN BPDU sends back an acknowledgement through its next forwarded Hello BPDU by marking the Topology Change Acknowledgement (TCA) bit in the flags field of the Hello.
- That designated switch then repeats steps 1 and 2 by sending the TCN out its Root Port and awaits the acknowledgement from the next upstream switch
- When the TCN finally arrives at the root switch it acknowledges the TCN by setting the TCA bit and sending the acknowledged BPDU out the port it received the TCN on.
- Subsequent BPDUs originating from the root switch will have the Topology Change (TC) bit set instructing all switches to shorten the aging time for CAM entries to Forward Delay seconds.