~/netref / STP & EtherChannel
##

STP & EtherChannel

Spanning Tree blocks redundant links to stop loops. EtherChannel bundles links into one logical pipe.

// loop-free topology

B–C blocked A·ROOT B C
Lowest bridge ID wins root. One redundant link is blocked to break the loop; it unblocks if a forwarding link fails.
// STP (802.1D) port states
BlockingListens to BPDUs only (~20s)
ListeningBuilding topology, no MAC learning (15s)
LearningLearns MACs, not forwarding (15s)
ForwardingNormal data traffic
DisabledAdministratively down
// RSTP (802.1w) states
DiscardingBlocking + listening merged
LearningLearns MACs
ForwardingPasses traffic
// port roles
Root portBest path toward the root bridge — one per non-root switch
Designated portForwarding port on each segment — one per segment
Alternate portBackup path to root, blocking (RSTP)
Backup portBackup to a designated port on a shared segment (RSTP)
// path cost (by speed)
10 Mbps100
100 Mbps19
1 Gbps4
10 Gbps2
// timers
Hello2 s — BPDU interval
Forward Delay15 s — listening + learning
Max Age20 s — BPDU expiry
// STP variants
STP (802.1D)Original — one tree for all VLANs
PVST+Cisco — a separate tree per VLAN
RSTP (802.1w)Rapid convergence in seconds
Rapid-PVST+Cisco RSTP per VLAN (default)
MSTP (802.1s)Maps many VLANs to a few instances

// STP facts

  • Prevents L2 loops by blocking redundant paths
  • Root bridge = lowest Bridge ID (priority + MAC)
  • Default priority 32768, set in steps of 4096
  • RSTP (802.1w) converges in seconds vs ~50s for STP
  • PortFast jumps access ports straight to forwarding
  • BPDU Guard shuts a PortFast port that sees a BPDU
// EtherChannel modes
LACP802.3ad (open)active / passive
PAgPCiscodesirable / auto
Staticno negotiationon
  • Bundles up to 8 active links into one logical link
  • Both ends must use compatible modes
  • Load-balances per flow, not per packet
spanning-tree · cisco ios
spanning-tree mode rapid-pvst
! Make this switch the root for VLAN 1
spanning-tree vlan 1 priority 4096
!
interface Gi0/1
 spanning-tree portfast
 spanning-tree bpduguard enable
!
interface Gi0/24
 spanning-tree guard root
verify
show spanning-tree
show spanning-tree vlan 1
show spanning-tree summary
show spanning-tree interface Gi0/1