Networking · Switching › Ethernet Switching › MAC Learning
Source MAC learning
Cheat sheet · https://pcornel.dk/topic.php?topic=959
Answer
Source MAC learning is how a switch builds its table: for each received frame it records the source MAC, VLAN and ingress port.
Remember
- Source MAC is learned on ingress; destination MAC drives egress selection
- Known unicast is forwarded to one learned port; unknown unicast and broadcast are flooded within the VLAN
- A frame received on the learned destination port is filtered
- Dynamic entries age; static entries remain until removed.
First checks
show mac address-table interface <interface>— learned on portshow mac address-table notification mac-move— MAC moves
Commands
show port-security interface Gi1/0/5show access-session interface Gi1/0/5show spanning-tree interface Gi1/0/5show mac address-table countshow sdm prefer
Verify in this order
frame arrives → source MAC → table entry (MAC, VLAN, port)
Where it usually breaks
media/optics → administrative state → carrier/line protocol → negotiation → error/drop counters → neighbor discovery → upper-layer adjacency
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=959