Four switches and one slow link
Four switches, all with the default priority 32768. They run classic STP with short path costs. Notice that one link is slower than the others.
Device key: SW-A, SW-B, SW-C, SW-D (switch)
Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.
- 1. Your job: work out the tree these switches will build. Write down each answer before you open it.
| Link | Speed | STP cost | Ports |
|---|---|---|---|
| SW-A – SW-B | 1 Gbps | 4 | A Gi0/1 ↔ B Gi0/1 |
| SW-A – SW-C | 100 Mbps | 19 | A Gi0/2 ↔ C Gi0/1 |
| SW-B – SW-D | 1 Gbps | 4 | B Gi0/2 ↔ D Gi0/1 |
| SW-C – SW-D | 1 Gbps | 4 | C Gi0/2 ↔ D Gi0/2 |
Task 1: which switch is the root bridge?
Show answer
SW-A. All priorities are 32768, so the lowest MAC address wins: …000A.
Task 2: the root port and cost of each other switch
Start at the root and work outward: B first, then D, then C.
Show answer
| Switch | Options | Root port | Cost |
|---|---|---|---|
| SW-B | Direct to A: 4 | Gi0/1 | 4 |
| SW-D | Through B: 4 + 4 = 8 · through C: 4 + C's cost | Gi0/1 (toward B) | 8 |
| SW-C | Direct to A: 19 · through D: 4 + 8 = 12 | Gi0/2 (toward D) | 12 |
The surprise is SW-C. Its direct link to the root costs 19. But the long way round, through D and B, costs only 12. STP compares cost, not the number of switches.
Task 3: the designated port on each link
Writing each switch's root path cost next to it on paper makes this step quick: on every link, the end with the lower number is designated.
Show answer
| Link | Compare root path cost | Designated port |
|---|---|---|
| A – B | A 0 vs B 4 | SW-A Gi0/1 |
| A – C | A 0 vs C 12 | SW-A Gi0/2 |
| B – D | B 4 vs D 8 | SW-B Gi0/2 |
| C – D | D 8 vs C 12 | SW-D Gi0/2 |
Task 4: which port is blocked?
Show answer and the finished tree
SW-C Gi0/1, its port on the slow link to SW-A. It is not C's root port, and SW-A's end of the link is designated. So this port is blocked.
Device key: SW-A, SW-B, SW-C, SW-D (switch)
Lines show the example’s network connections. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type. Blocked: forwarding prevented by a port or policy. Down: failed link. Read the step for the cause.
- 1. SW-C's path to the root: C → D → B → A, total cost 12. It avoids the slow direct link.
- 2. The slow link is the backup. SW-C Gi0/1 is blocked. It only forwards if the path through D fails.
Bonus: upgrade the slow link
The A–C link is upgraded to 1 Gbps (cost 4). Work everything out again.
Show answer
- SW-C: direct to A = 4, so its root port becomes Gi0/1 (cost 4).
- SW-D: through B = 8, through C = 8. It's a tie. The lower sender bridge ID wins, which is SW-B (…000B). So D's root port stays Gi0/1.
- Link C–D: C is cost 4, D is cost 8, so SW-C Gi0/2 is designated.
- Blocked: SW-D Gi0/2 (toward C). The blocked port has moved to the other side of the square.