Spanning Tree
Cisco PVST+ 802.1d
Root Bridge
- Elect Root Bridge -> Lowest Bridge ID
- Bridge ID -> Priority + MAC
- All ports on the Root Bridge are Designated ports and are in a Forwarding State.
- Root Bridge is the Reference Point for everyone else.
- Each switch in the network looks for the best path to the root bridge.
- Decision is made based on the path cost. If the path cost is the same Port ID breaks tie.
- All other ports towards the Root Bridge are put in Blocking/Alternate state.
Path Cost
- Ethernet = 100
- Fast Ethernet = 19
- Gigabit = 4
- 10 Gigabit = 2
Port States - Convergence takes 50 seconds
- Disabled
- Blocking - 20 seconds
- Listening - 15 seconds
- Learning - 15 seconds
- Forwarding
- BPDUs - Hello timer is sent every 2 seconds
- TCNs are sent up stream to each device notifing the switch of a change in the topology.
- TCAs are sent back down stream to acknowledge the changes.
- This is done untill the TCN reaches the Root Bridge.
Rapid PVST+ 802.1w
Root Bridge
- Elected the same way as 802.1d
Port States
- Discarding
- Learning
- Forwarding
Port Roles
- Root Port - Same
- Designated Port - Same
- Alternative Port - In case other path goes down on other router attached to segment.
- Backup Port - Same switch as the designated port
- UplinkFast is most useful in wiring-closet switches with a limited number of active VLANs. This enhancement might not be useful for other types of applications and should not be enabled on backbone or distribution layer switches.
- If Switch C detects a link failure on the currently active link L2 (a direct link failure), UplinkFast unblocks the blocked port on Switch C and transitions it to the forwarding state immediately, without transitioning the port through the listening and learning states. This switchover takes approximately one to five seconds.
- If link L1 fails, Switch C detects this failure as an indirect failure, since it is not connected directly to link L1. Switch B no longer has a path to the root switch. BackboneFast allows the blocked port on Switch C to move immediately to the listening state without waiting for the maximum aging time for the port to expire. BackboneFast then transitions the port on Switch C to the forwarding state, providing a path from Switch B to Switch A. This switchover takes approximately 30 seconds.
- BPDU filtering allows you to avoid transmitting BPDUs on PortFast-enabled ports that are connected to an end system. When you enable PortFast on the switch, spanning tree places ports in the forwarding state immediately, instead of going through the listening, learning, and forwarding states.
- By default, spanning tree sends BPDUs from all ports regardless of whether PortFast is enabled. BDPU filtering is on a per-switch basis; after you enable BPDU filtering, it applies to all PortFast-enabled ports on the switch.
The PortFast feature is configured on an individual port and the PortFast BPDU guard option is configured either globally or on a per-port basis.
When you disable PortFast on a port, PortFast BPDU guard becomes inactive. The port configuration overrides the global configuration unless the port configuration is set to default. If the port configuration is set to default, the global configuration is checked. If the port configuration is enabled, the port configuration is used and the global configuration is not.
- The loop guard feature makes additional checks. If BPDUs are not received on a non-designated port, and loop guard is enabled, that port is moved into the STP loop-inconsistent blocking state, instead of the listening / learning / forwarding state. Without the loop guard feature, the port assumes the designated port role. The port moves to the STP forwarding state and creates a loop.
- The root guard ensures that the port on which root guard is enabled is the designated port. Normally, root bridge ports are all designated ports, unless two or more ports of the root bridge are connected together. If the bridge receives superior STP Bridge Protocol Data Units (BPDUs) on a root guard-enabled port, root guard moves this port to a root-inconsistent STP state. This root-inconsistent state is effectively equal to a listening state. No traffic is forwarded across this port. In this way, the root guard enforces the position of the root bridge.
Comments