show port-security address
Lists every secure MAC address the switch holds, its VLAN, port and whether it is static, sticky or dynamic.
Written by a working field network engineer · CCNA, Security+, CySA+
Lists every secure MAC address on the switch with the VLAN and port it is tied to. Use it to see what a sticky port has locked itself to before you move a device.
Example output
SW1#show port-security address
Secure Mac Address Table
-----------------------------------------------------------------------------
Vlan Mac Address Type Ports Remaining Age
(mins)
---- ----------- ---- ----- -------------
10 0050.7966.6817 SecureSticky Fa0/1 -
10 0050.7966.6818 SecureDynamic Fa0/2 -
-----------------------------------------------------------------------------
Total Addresses in System (excluding one mac per port) : 0
Max Addresses limit in System (excluding one mac per port) : 4096Reference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.
Useful variants
show port-security address | include Fa0/1
What each column or field means
| Field | Meaning |
|---|---|
Type | SecureConfigured (typed in), SecureSticky (learned and kept in the config) or SecureDynamic (learned, lost on reload). |
Remaining Age | Minutes before the address ages out, if aging is configured. A dash means it never ages. |
When it doesn’t look right
A replaced PC cannot connect on a sticky port.
The old MAC still holds the port’s only slot. Remove it with clear port-security sticky interface <port> (or no switchport port-security mac-address sticky <mac>) and let the new one be learned.
Related commands
Try it yourself
- Sticky MAC Address Learning (Pro)
- A Complete Port Security Policy (Pro)
- Free lab on this topic: Switchport Port Security
- Or build the example network in the free Sandbox
Learn it in the CCNA path
- Limit secure MAC addresses and verify sticky learning (5. Security Fundamentals)
Topic
Port Security — Limit which MAC addresses an access port accepts, choose a violation action, learn sticky addresses and recover err-disabled ports.