Cisco "show mac address-table" Command Explained
show mac address-table — displays which MAC addresses the switch has learned on which ports — the map it uses to forward frames. Runs in privileged EXEC mode.
Syntax and common variants
| Variant | Purpose |
|---|---|
show mac address-table | All learned MACs |
show mac address-table interface gi0/5 | What's learned on one port |
show mac address-table vlan 10 | Per-VLAN view |
show mac address-table address aaaa.bbbb.cccc | Find one device |
Reading the output
| Output field | Meaning |
|---|---|
Vlan | VLAN the MAC was learned in |
Mac Address | The device's hardware address |
Type | DYNAMIC (learned) or STATIC (configured) |
Ports | Where frames to this MAC are sent |
When to use it
The physical-locator: given a MAC (from ARP on the router), this tells you the exact switch port a device hangs off — follow it switch-to-switch to trace any host. Also the tool that exposes loops: one MAC flapping between two ports. Browse more in the command reference or practise in the free labs.
Frequently asked questions
How do I find which port a device is on?
Get its MAC (from the device or the router's ARP table), then show mac address-table address
Why does one MAC keep moving between ports?
MAC flapping — usually a Layer 2 loop, or two links to the same host without aggregation. Investigate STP immediately.
How long do dynamic entries last?
300 seconds of inactivity by default, then they age out and get re-learned.
Related articles
Want hands-on training?
Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.