Lesson 30: STP Port Roles and Path Cost
After electing the Root Bridge, STP determines the role of every port to ensure a loop-free topology:
STP Port Roles
- Root Port (RP): The port on a non-Root switch that provides the best (lowest cost) path to the Root Bridge. Only one RP per non-Root switch.
- Designated Port (DP): A port that provides the best path out of a network segment. All ports on the Root Bridge are DPs. Only one DP per segment.
- Blocked/Alternate Port (BP/AP): Ports that are logically shut down to prevent a loop. They listen for BPDUs but do not forward user data.
Path Cost Calculation
STP determines the 'best path' based on the lowest cumulative Path Cost from the switch to the Root Bridge. Cost is based on link speed (Cisco default cost):
| Link Speed | STP Cost |
|---|---|
| 10 Gbps | 2 |
| 1 Gbps (Gigabit) | 4 |
| 100 Mbps (Fast Ethernet) | 19 |
| 10 Mbps (Ethernet) | 100 |
If costs are tied, the lower Sender BID breaks the tie. If BIDs are tied, the lower Sender Port ID breaks the tie.