Use it to find where a device is connected, and to explain flooding or a MAC address that keeps moving.
Switching Concepts
A switch learns which MAC address is behind which port by reading the source address of every frame it receives. It forwards a frame out of the one port where the destination was learned — or floods it to all ports in the VLAN if the destination is unknown or broadcast.
1. Get the device's MAC address (show ip arp <ip> on the gateway).
2. show mac address-table address <mac> — which port?
3. That port leads to another switch (show cdp neighbors) → repeat there.
4. Not in the table → the device is silent or in another VLAN; ping it and look again.
5. "MAC flapping" in the log → a loop: find the two ports named.
frame arrives → source MAC learned on the ingress port and VLAN → destination looked up → known: forwarded out of one port; unknown or broadcast: flooded in the VLAN → entry refreshed by traffic or aged out
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show mac address-table [dynamic]Show Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show mac address-table [dynamic]ShowInspect learned MAC-to-port mappings.
Use when: CAM/MAC learning troubleshooting.
IOS/IOS XE · mixedshow vlan briefShowCompact VLAN membership/status view.
Use when: Quickly confirm VLAN existence and access-port membership.
Quick note: Best first VLAN database check; move to switchport/trunk state next.
Cisco IOS XE · mixedHow to read the output
show mac address-table [dynamic]Look first: VLAN, MAC, type, learned interface
Healthy: Endpoint MAC is learned in expected VLAN/interface.
Warning: Missing, flapping or learned on unexpected interface/VLAN.
Does not prove: MAC learning does not prove ARP/IP routing or application reachability.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Commands & verification Verify boundary
| Command | Shows |
|---|---|
show mac address-table | All entries: VLAN, MAC address, type, port |
show mac address-table address <mac> | Where one address was learned |
show mac address-table interface <interface> | The addresses behind one port |
show mac address-table vlan <id> | One VLAN |
show mac address-table count | Number of entries per VLAN |
show mac address-table aging-time | The ageing timer |
clear mac address-table dynamic | Remove learned entries so they are relearned |
Cisco writes MAC addresses as three groups of four hexadecimal digits: 0011.2233.4455.
Step 2 MAC table as evidence Verify boundary
Use the MAC table to ask where the switch last learned an endpoint. A missing MAC suggests the endpoint has not sourced frames on that VLAN/path; a MAC moving rapidly between ports may indicate topology/looping or endpoint mobility.
Step 3 Troubleshooting approach Narrow the fault
Finding where a device is connected.
1. Get its MAC address — from the device, or from the gateway with show ip arp <ip>.
2. show mac address-table address <mac> on a switch.
3. If the port leads to another switch (show cdp neighbors), go there and repeat until the port is an access port.
The address is not in the table. The device has not sent anything recently, is in another VLAN, or is not connected. Ping it from the gateway and look again.
"MAC flapping between ports" in the log. The same address is seen on two ports in turn: a loop, a device connected twice without a proper bundle, or a duplicated address (cloned virtual machines). The message names both ports.
Unexpected flooding. The table is full, entries age out before the device answers, or spanning-tree topology changes keep flushing the table.
Step 4 Common mistakes Narrow the fault
- "The switch learns from the destination address." It learns from the source and forwards by the destination.
- "A device not in the table is not connected." It may simply have been silent for five minutes.
- "A switch sends every frame only where it belongs." Broadcasts and unknown unicasts go to every port in the VLAN.
- "Switches forward between VLANs." A Layer 2 switch never does; that requires routing.
- "Many addresses on one port is a fault." It is normal on a port leading to another switch.
- "MAC flapping is cosmetic." It usually indicates a loop.
Learning is from the source address, forwarding by the destination. Entries age out after 300 seconds without traffic. Unknown unicast, broadcast and multicast are flooded within the VLAN. The same MAC address appearing on two ports in turn points to a loop or a duplicate.
show mac address-table— all learned addresses with VLAN and port.show mac address-table address <mac>— where one address is.show mac address-table interface <interface>— what is behind one port.show mac address-table aging-time— the ageing timer.show mac address-table count— table size per VLAN.
ReferenceWhat it is1 section · depth on demand
What it is
A switch connects devices in a local network and forwards Ethernet frames between them. It learns where each device is by noting the source MAC address of every frame it receives, and uses that table to send each frame only to the port where its destination lives.
ReferenceWhy it matters1 section · depth on demand
Why it matters
The MAC address table is the switch's record of what it has seen, and it answers the most practical question in a LAN: which port is this device connected to? Its behaviour also explains what a switch does when it does not know — it floods — and why a loop in a switched network is so destructive.
ReferenceHow it works1 section · depth on demand
How a switch learns and forwards
For every frame, a switch does three things.
1. Learn. It records the frame's source MAC address together with the port it arrived on and the VLAN. If the address was already known on another port, the entry is moved.
2. Look up. It searches the table for the frame's destination MAC address in that VLAN.
3. Forward, flood or filter.
| Destination | Action |
|---|---|
| Known, on another port | Forward out of that one port |
| Unknown unicast | Flood: send out of every port in the VLAN except the one it came in on |
| Broadcast (ffff.ffff.ffff) | Flood |
| Multicast | Flood, unless IGMP snooping limits it |
| Known, on the same port it arrived on | Filter: drop it |
Ageing. An entry that is not refreshed by new frames from that address is removed after 300 seconds by default. A silent device therefore disappears from the table, and the next frame to it is flooded until it speaks again.
VLANs. Learning and flooding happen per VLAN. A frame is never forwarded or flooded into another VLAN; that takes a router or a Layer 3 switch.
Trunks and uplinks. Many addresses are learned on a port that leads to another switch — everything behind it. Following a device through the network means following its address from table to table.
Why loops are fatal. Ethernet frames have no hop limit. With a loop, a flooded frame circulates and multiplies endlessly, and the switches see the same source address arriving on different ports in turn — reported as MAC flapping. Spanning tree exists to block such loops.
Static and secure entries. An address can be entered by hand, and port security can limit which or how many addresses a port may learn.
ReferenceImportant terms & boundaries3 sections · depth on demand
Important terms & boundaries
| Term | Meaning |
|---|---|
| MAC address table (CAM table) | Address, VLAN and port for each learned device |
| Dynamic entry | Learned from traffic; ages out |
| Static entry | Configured; does not age |
| Unknown unicast | A frame to an address not in the table |
| Flooding | Sending out of all ports in the VLAN except the ingress port |
| Ageing time | 300 seconds by default |
| Collision domain | Each switch port is its own |
| Broadcast domain | Each VLAN is one |
In depth
Switching concepts: learn, look up, forward
For every frame, a switch learns the source MAC address against the incoming port and VLAN. It then looks up the destination MAC in the same VLAN, and forwards, floods or filters the frame. Cisco's MAC Address Table Manager technote for Catalyst 9000 shows how this works on a modern switch:
- Learning creates entries in a software table (IOS MATM) and in the hardware table (FED MATM).
- Forwarding uses the hardware table.
- The table has a fixed size: 32,768 entries on a C9300.
- When it's full, the switch logs
MATM-3-MAX_ENTRIESand can't learn new addresses.
Learn, look up, forward
| Step | Uses | Result |
|---|---|---|
| Learn | Source MAC, ingress port, VLAN | Table entry, refreshed while traffic continues |
| Look up | Destination MAC, VLAN | Known or unknown |
| Forward | Known unicast | Out of one port |
| Flood | Unknown unicast, broadcast, most multicast | Out of all ports in the VLAN except the ingress |
| Filter | Destination on the ingress port | Dropped |
Switching compared with routing
| Switch (Layer 2) | Router (Layer 3) | |
|---|---|---|
| Decides on | Destination MAC address | Destination IP address |
| Scope | Within a VLAN | Between networks |
| Table | MAC address table | Routing table, FIB |
| Unknown destination | Flood | Drop (or use a default route) |
| Loop protection | Spanning tree | TTL |
Concepts checked in practice
| Question | Command |
|---|---|
| Where is this MAC? | show mac address-table address <mac> |
| How many MACs are learned? | show mac address-table count |
| Is the table filling up? | show platform hardware fed switch active fwd-asic resource tcam utilization |
| How long do entries last? | show mac address-table aging-time |
SW1# show mac address-table address a4bb.6d55.0164
110 a4bb.6d55.0164 DYNAMIC Gi1/0/14
SW1# show mac address-table count vlan 110 | include Total
SW1# show mac address-table interface TenGigabitEthernet1/1/1 | include Total
Total Mac Addresses for this criterion: 386
Many MACs learned on an uplink is normal, because every host beyond it appears there. A host MAC learned on an unexpected access port points to a moved device, a loop or a duplicated MAC address.
Documented example, not captured output.
Quick reference
A switch builds its forwarding decisions from what it sees. It learns which MAC addresses sit behind which ports by reading the source address of every frame, forwards frames to known destinations on just one port, and floods frames whose destination it does not know. Understanding these basic behaviours explains most of what happens in a Layer 2 network.
Switching concepts: switches learn source MACs per port and VLAN, forward known unicast to one port, flood unknown unicast/broadcast/multicast within the VLAN, and block loops with STP.
show mac address-table dynamic vlan 20
show mac address-table count
show interfaces counters errors
show spanning-tree vlan 20
VLANs split broadcast domains; routing between them happens on a Layer 3 switch or router.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network Fundamentals → Switching Concepts. 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%Deep reference
Exam focus
Exam focus
- CCNA-1.13 — Describe switching concepts. MAC learning/aging, frame switching/flooding and MAC table.
- CCNA-1.13.a — MAC learning and aging. MAC learning/aging.
- CCNA-1.13.b — Frame switching. Frame switching behavior.
- CCNA-1.13.c — Frame flooding. Frame flooding behavior.
- CCNA-1.13.d — MAC address table. MAC table purpose/behavior.