Pcornel
Networking · Network Devices › Layer 2 Switch

MAC learning

Cheat sheet · https://pcornel.dk/topic.php?topic=851

Back to the Topic

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-table shows learned entries.

First checks

  • show mac address-table dynamic — learned MACs
  • show mac address-table count — usage

Commands

show mac address-table
show 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

Confirmation

Confirm action

Continue?