BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Port Security

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) : 4096

Reference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.

Useful variants

What each column or field means

FieldMeaning
TypeSecureConfigured (typed in), SecureSticky (learned and kept in the config) or SecureDynamic (learned, lost on reload).
Remaining AgeMinutes 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

Learn it in the CCNA path

Topic

Port Security — Limit which MAC addresses an access port accepts, choose a violation action, learn sticky addresses and recover err-disabled ports.

All 57 commands