Redundant switch links cause catastrophic loops. Spanning Tree blocks loops automatically; EtherChannel bonds links into one for bandwidth without a loop.
Why: switches flood broadcasts out every port, so two paths between switches create a loop where frames circle forever — a broadcast storm that melts the network in seconds. When: any redundant Layer-2 topology (which you want for resilience) risks this. Where: Spanning Tree Protocol (STP) prevents it by blocking redundant paths until they are needed.
SW1 ===== SW2 two links for redundancy...
\\ // ...but a broadcast loops SW1->SW2->SW1 forever
\\ // -> broadcast storm, MAC table instability, outage
STP elects a root bridge and BLOCKS one path, leaving a loop-free tree.
If the active link fails, STP unblocks the standby path.Why: STP runs by default, but you should control WHICH switch is the root (it should be a core switch, not a random access switch) and enable PortFast on access ports so end devices get link immediately. When: set the root priority on your core switches; enable PortFast + BPDU guard on user ports. Where: never enable PortFast on a switch-to-switch link — it defeats loop protection.
! Make this switch the root for VLANs 10 and 20 (lower priority wins):
SW1(config)# spanning-tree vlan 10,20 root primary
! On ACCESS ports only — skip listening/learning so PCs get link fast:
SW1(config)# interface range Fa0/1 - 12
SW1(config-if-range)# spanning-tree portfast
SW1(config-if-range)# spanning-tree bpduguard enable ! shut port if a switch appears
SW1# show spanning-tree vlan 10Why: STP blocks redundant links, wasting their bandwidth — EtherChannel instead bundles multiple physical links into one logical link, so all of them forward and STP sees a single loop-free path. When: use it between switches (or to a server) that need more bandwidth and redundancy. Where: both ends must agree on the channel; LACP (802.3ad) negotiates it.
! Bundle two links into one logical EtherChannel with LACP:
SW1(config)# interface range Gig0/1 - 2
SW1(config-if-range)# channel-group 1 mode active ! active = LACP
SW1(config-if-range)# exit
SW1(config)# interface port-channel 1
SW1(config-if)# switchport mode trunk
SW1# show etherchannel summary ! confirm the bundle is up