Ethernet Switching and Layer 2 Technologies
This domain covers VLANs and 802.1Q, trunking, MAC learning, spanning tree, link aggregation and neighbour discovery - the mechanics that keep a Layer 2 network loop-free and predictable.
VLANs and tagging
An access port carries one untagged VLAN; a trunk carries many, tagging all except the native VLAN. 802.1Q inserts a 4-byte tag with a 12-bit VID (1–4094 usable). A native VLAN mismatch silently moves untagged traffic into the wrong VLAN, which is a favourite exam fault. Allowed-VLAN lists must match at both ends.
Spanning tree
Bridge ID is priority (default 32768, adjustable in 4096 steps) followed by MAC; the lowest wins the root election. RSTP (802.1w) uses discarding, learning and forwarding states with root, designated and alternate roles, and converges in seconds. MSTP (802.1s) maps VLANs to instances for load balancing. Edge/PortFast ports skip the listening phase but must have BPDU guard. Root guard protects the intended root from a rogue superior BPDU.
Aggregation and discovery
LACP (802.3ad) bundles links; at least one side must be active (active/active or active/passive). Hashing is per flow, so one conversation never spans all members. LLDP shows the neighbour's port and system name and is the first check for wiring mistakes.
Edge features
Port security limits learned MACs per port; storm control caps broadcast/multicast rates; MAC learning can be disabled on uplinks.
Worked example
SW-A has priority 4096, SW-B and SW-C both 32768. SW-A is root. Between SW-B and SW-C the tie breaks on the lower bridge MAC, so that switch takes the designated role and the other places its uplink in the alternate (discarding) role. If SW-A fails, the surviving path converges within RSTP timing, not the 30-plus seconds of legacy STP.
Traps
Calling the RSTP discarding state blocking; assuming passive/passive forms a bundle; forgetting the native VLAN on one side; expecting a single TCP flow to use all LACP members; enabling edge ports without BPDU guard and creating a loop.