Spanning Tree Operation
We explore the operations of the Spanning Tree Protocol.
Spanning Tree operation: how the protocol works
Here is a topology we’re going to work with:
The Root bridge elections start. Switches exchange Ethernet BPDU frames. The BPDUs are Configuration BPDUs.
Every switch in the network starts by claiming that he is the root bridge. Here, let’s examine Switch2.
Switch2 STP process crafts a BPDU where RID=BID.
Let’s examine Switch2 MAC address:
So in the BPDU, RID will be equal to BID:
The Ethernet BPDU frame is sent to the multicast spanning tree address which is 01:80:C2:00:00:00. We can see that by inspecting the destination MAC address of the Ethernet frame:
However, you may notice that the source MAC address of the Ethernet frame (00D0.BC2E.BE02) is different from the MAC address in the Bridge ID (0001.6493.0687). That’s because the former is the MAC address of the interface that sent the frame, while the latter is the MAC address of the switch itself:
Switch0 and Switch1 ports receive the Ethernet frame sent by Switch2. Since the destination address of Switch2’s Ethernet frame is a multicast, then both Switch0 and Switch1 consider the frame. The Ethernet layer decapsulates the PDU: it’s a BPDU. So STP takes charges.
The STP process inspects the BPDU. In our example, Switch2 has the lowest MAC address. Besides, I did not change any priority on any switch. So the STP process on Switch0 and Switch1 finds that it is a superior BPDU:
- Switch0 received the superior BPDU on port f0/2. This will be the root port
- Switch1 received the superior BPDU on port f0/2. This will be the root port
After Switch1 receives the Ethernet BPDU frame and discovers it is a superior BPDU, it crafts an Ethernet BPDU frame and sends it. We clearly see that the bridge ID is different from the Root bridge ID.
Switch0 is tuned to the spanning tree multicast address and hears an Ethernet frame on it. It decapsulates the PDU and finds out it’s a BPDU. The Spanning tree process takes charge and inspects the BPDU. There’s nothing new, because Switch0 already had received this information -which is a superior BPDU- from Switch2.
Spanning tree has converged and the tree is as follows:
Whenever you need a refresher on your CCNA skills and at the same time review at your own pace, then I would recommend the Lazaro Diaz CCNA course.