Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Source MAC learning

Direct answer

Source MAC learning is how a switch builds its table: for each received frame it records the source MAC, VLAN and ingress port.

When to use this

Use it when a host's MAC address is missing from the table or appears on the wrong port.

First 30 seconds

1. Switches learn by reading the source MAC of each frame.

2. Entry maps MAC + VLAN to port.

3. Same MAC on two ports means a loop or move.

4. Learning can be disabled per VLAN.

5. Check moves when debugging.

Operational verification

frame arrives → source MAC → table entry (MAC, VLAN, port)

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE
Key commandshow mac address-table dynamic vlan 10
Scope / prerequisiteUse it when a host's MAC address is missing from the table or appears on the wrong port.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Commands Verify boundary
show mac address-table dynamic vlan 10
show mac address-table notification mac-move
Step 2 Verification & troubleshooting Narrow the fault

1. Confirm ingress VLAN and STP forwarding state.

2. Verify source MAC learning.

3. Inspect destination MAC entry/type/age.

4. Trace trunk VLAN allowance to egress.

Step 3 Common mistakes Narrow the fault
  • Ignoring MAC-move notifications that indicate loops.
  • Server NIC teaming in the wrong mode causing flaps.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • 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.
Key checks
  • show mac address-table interface <interface> — learned on port
  • show mac address-table notification mac-move — MAC moves
ReferenceWhat it is1 section · depth on demand

How it works

For every incoming frame, the switch reads the source MAC address and stores it with the VLAN and port. If the MAC already exists on another port, the entry moves (a MAC move); frequent moves between two ports usually mean a loop or a misconfigured server NIC team.

ReferenceImportant terms & boundaries2 sections · depth on demand

Learning rules

  • Learned per VLAN: the same MAC can exist in two VLANs.
  • Refreshed every time the host sends; moves to a new port if the MAC appears there (MAC move).
  • Not learned from frames that port security, 802.1X or STP blocking drop.

Frequent MAC moves (%SW_MATM-4-MACFLAP_NOTIF) point to a Layer 2 loop, a duplicated MAC, or a host connected twice (for example a teamed NIC misconfigured).

In depth

When a source MAC is not learned

ReasonEffectCheck
Port security maximum reachedNew MACs dropped or port err-disabled (violation mode)show port-security interface Gi1/0/5
802.1X/MAB not yet authorisedOnly EAPOL allowed; data MACs not learnedshow access-session interface Gi1/0/5
Learning disabled for the VLANEvery frame to those hosts is floodedshow running-config \| include learning
Port in STP blocking/discardingFrames dropped before learningshow spanning-tree interface Gi1/0/5
Multicast/broadcast source MACInvalid source, never learnedCapture shows faulty NIC or attack
Table fullNew entries cannot be added → floodingshow mac address-table count

no mac address-table learning vlan 10 exists for special designs (for example RSPAN-like VLANs or service insertion); used by mistake it turns a VLAN into a hub.

Capacity and SDM template

The MAC table shares hardware resources with routes and ACLs according to the SDM template. show sdm prefer shows the current limits; show mac address-table count shows how close the switch is. A MAC flooding attack fills the table and turns unicast into flooding — port security or 802.1X limits it.

MAC moves as evidence

mac address-table notification mac-move
%SW_MATM-4-MACFLAP_NOTIF: Host 0050.56aa.0001 in vlan 10 is flapping between port Gi1/0/1 and port Po1

A MAC that alternates between an access port and an uplink means the host's frames return through the network — a loop or bridging NICs. A MAC moving between two uplinks often means a loop in another switch.

Hardware vs software view on Catalyst 9000

Learning happens in hardware and is reported to the MATM process; Cisco's MATM troubleshooting guide compares the software table with the FED/hardware tables when they disagree (for example after rapid moves or in stacks).

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Switching → Ethernet Switching → MAC Learning → Source MAC learning. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Confirmation

Confirm action

Continue?