Redundant physical paths in Layer 2 switched networks can create loops. STP prevents Layer 2 loops by blocking some redundant paths.

Key terms

  • Root Bridge — the central switch in the spanning-tree topology.
  • Root Port — the best path toward the root bridge.
  • Designated Port — the forwarding port for a segment.
  • Alternate Port — a backup path, normally not forwarding.

Cisco IOS inspection

show spanning-tree
show spanning-tree vlan 10
show spanning-tree root

PortFast and BPDU Guard

PortFast can reduce transition delay on access ports connected to end devices. BPDU Guard can protect these edge ports by disabling a port if it receives a BPDU. Apply it only to intended edge ports after checking the topology.

interface range fastEthernet 0/1 - 12
 switchport mode access
 spanning-tree portfast
 spanning-tree bpduguard enable

Practice

Connect three switches with redundant links, observe root-bridge election and explain the output of show spanning-tree.