Switching
Cheat sheet · https://pcornel.dk/topic.php?topic=577
Answer
Switching is how a Layer 2 switch forwards Ethernet frames: it learns source MAC addresses per VLAN, forwards known destinations out one port, floods unknown ones within the VLAN, and relies on spanning tree to keep the topology loop-free.
Remember
Check the boundaries in order: port up, VLAN membership, trunk allowed and forwarding VLANs, spanning-tree state, MAC learning. EtherChannel and Layer 2 security features (port security, DHCP snooping, DAI) can block traffic on a port that otherwise looks fine.
First checks
show interfaces status— port state, VLAN, speed and duplex at a glance.show vlan brief— VLANs and access ports.show interfaces trunk— trunks and forwarding VLANs.show spanning-tree vlan <id>— root and port roles per VLAN.show mac address-table address <mac>— where a host is learned.show etherchannel summary— bundles and member state.
Commands
show interfaces trunkshow spanning-tree vlanshow mac address-table
Verify in this order
port up → correct VLAN → trunks forward the VLAN → spanning tree forwards → MAC learned on the right port → frame forwarded to the destination
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=577