Networking · Network Devices › Layer 2 Switch
MAC learning
Cheat sheet · https://pcornel.dk/topic.php?topic=851
Answer
A switch learns MAC addresses by recording the source MAC and ingress port (per VLAN) of each frame in its MAC address table; unknown destinations are flooded and entries age out (300 s by default).
Remember
- Switches learn MAC addresses from the source address of incoming frames.
- Entries age out after 300 seconds by default.
show mac address-tableshows learned entries.
First checks
show mac address-table dynamic— learned MACsshow mac address-table count— usage
Commands
show mac address-tableshow platform software fed switch active matm macTable vlan 10
Verify in this order
frame → learn source MAC → table
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=851