Routing & Switching
Switching & STP
How Ethernet switches actually forward traffic: MAC learning, flooding, VLANs and trunking — and how Spanning Tree Protocol keeps redundant layer-2 topologies from melting down into broadcast storms.
- read in order, or dip in
- 2 chapters
- updated 31 Aug 2026
- Free — no signup
read in order, or dip in
updated 31 Aug 2026
Contents
- 01How Switches Forward: MAC Learning, Flooding and VLANsA switch builds its MAC address table by recording the source MAC of every frame against the port it arrived on, then forwards frames out the single port where the destination MAC was learned. Unknown unicast, broadcast and unlearned multicast frames are flooded to every port in the VLAN, and VLANs segment one physical switch into multiple isolated broadcast domains.
- 02Spanning Tree Protocol: Root Bridges, Port Roles and RSTPSpanning Tree Protocol (IEEE 802.1D) prevents layer-2 loops by electing a root bridge and blocking every redundant path, leaving one loop-free tree. Ports converge through blocking, listening, learning and forwarding states; Rapid STP (802.1w) collapses convergence from around 50 seconds to a few seconds and is what every modern network runs.
Spotted something out of date? Tell us — this library is maintained by the faculty.