Pcornel
Networking · Switching › Ethernet Switching › MAC Learning

Source MAC learning

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

Back to the Topic

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 port
  • show mac address-table notification mac-move — MAC moves

Commands

show port-security interface Gi1/0/5
show access-session interface Gi1/0/5
show spanning-tree interface Gi1/0/5
show mac address-table count
show 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

Confirmation

Confirm action

Continue?