Quiz Entry - updated: 2026.07.05
Walk through a complete port security configuration example with maximum 4 MACs (Media Access Control addresses), one static, and sticky learning.
Configure the port for access mode, enable port security, set max to 4, manually add one MAC address, enable sticky for the rest. The switch learns up to 3 more MACs dynamically and saves them to config.
Complete configuration:
Switch(config)# interface FastEthernet 0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 4
Switch(config-if)# switchport port-security mac-address aaaa.3333.1234
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# end
What this does:
- Maximum 4 MAC addresses allowed on the port
- 1 static MAC (
aaaa.3333.1234) is always authorized — this might be a known server or phone - Sticky learning fills the remaining 3 slots — the next 3 unique devices to connect get their MACs auto-added to the config
- After 4 MACs are learned → any new MAC triggers a violation
Verification:
Switch# show port-security interface Fa0/1
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Maximum MAC Addresses : 4
Total MAC Addresses : 1
Configured MAC Addresses : 1
Sticky MAC Addresses : 0
Switch# show port-security address
Vlan Mac Address Type Ports
---- ----------- ---- -----
1 aaaa.3333.1234 SecureConfigured Fa0/1
After devices connect, sticky MACs appear in the running-config:
Switch# show run | begin interface FastEthernet0/19
switchport port-security mac-address sticky
switchport port-security mac-address sticky 0025.83e6.4b02
Go deeper:
Cisco CCNA Port Security and Configuration (CertificationKits) — worked example combining
maximum, sticky learning, violation mode, andshowoutput.Port Security (Study-CCNA) — a second walkthrough with sticky learning and err-disabled output.