show mac address-table
Shows which MAC addresses the switch has learned, in which VLAN, on which port.
Written by a working field network engineer · CCNA, Security+, CySA+
Shows what the switch has learned: for each VLAN, which MAC address lives behind which port. It answers “where is this host plugged in?” and explains why a frame was forwarded, flooded or filtered.
Example output
SW1#show mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
10 0050.7966.6812 DYNAMIC Gi0/1
10 0050.7966.6817 STATIC Fa0/1
10 0050.7966.6818 STATIC Fa0/2
20 0050.7966.6820 DYNAMIC Po1
Total Mac Addresses for this criterion: 4Reference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.
Useful variants
show mac address-table dynamicshow mac address-table address 0050.7966.6818show mac address-table interface Fa0/1show mac address-table vlan 10
What each column or field means
| Field | Meaning |
|---|---|
Vlan | The VLAN the address was learned in. The same MAC can appear in more than one VLAN. |
Mac Address | The source MAC address of frames received, in Cisco dotted format. |
Type | DYNAMIC (learned, ages out after 300 seconds by default) or STATIC (configured, or a port-security secure address: Fa0/1 and Fa0/2 both run port security here). |
Ports | The port frames to this MAC are sent out of. A trunk or port-channel here means the host is on another switch. |
When it doesn’t look right
A host’s MAC is missing.
The switch has not received a frame from it (silent host, wrong VLAN, port down) or the entry aged out. Ping the host to make it send, then look again.
The same MAC keeps moving between two ports.
MAC flapping usually means a Layer 2 loop or a host dual-homed without teaming. Check show spanning-tree for a port that should be blocking.
Hundreds of MACs on one access port.
Either an unmanaged switch or hub is attached, or a MAC flooding attack is in progress. Port security limits the count.
Related commands
Try it yourself
- VLAN Creation & Naming (free)
- Sticky MAC Address Learning (Pro)
- Spanning-Tree (STP) Basics (free)
Learn it in the CCNA path
- Layer 2 Switching (2. Network Access)
- Follow one ping through its Ethernet frame (2. Network Access)
- Predict whether a switch forwards, floods or filters (2. Network Access)
- Learn MACs and forward on destination plus VLAN (Prerequisite review: CCNA topics from the CCNP courses)
Topic
Switching Basics — How a switch learns MAC addresses, how to read interface status, and how to fix speed, duplex and administratively down ports.