Cisco – Sticky MAC – Not working/appearing in run config

ciscoport-security

Running 3 x 3850's stacked.

On some interfaces I run the following commands:

interface GigabitEthernet1/0/1
description Servers
switchport access vlan 50
switchport mode access
switchport port-security mac-address sticky
ip access-group xxxxxx in
spanning-tree bpduguard enable

However I can plug other devices in and they gain connectivity and "Learnt" MAC address does not appear in running-config.

It doesn`t appear to be implementing Stick MAC successfully.

This appears to be sue to port security not working as per output of:

CABA_SW#show port-security int g 1/0/1
Port Security              : Disabled
Port Status                : Secure-down
Violation Mode             : Shutdown
Aging Time                 : 0 mins
Aging Type                 : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses      : 1
Total MAC Addresses        : 0
Configured MAC Addresses   : 0
Sticky MAC Addresses       : 0
Last Source Address:Vlan   : 0000.0000.0000:0
Security Violation Count   : 0

I thought the command "switchport port-security mac-address sticky"
would enable port security?

IOS:

Cisco IOS XE Software, Version 16.06.01
Cisco IOS Software [Everest], Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 16.6.1, RELEASE SOFTWARE (fc2)

Any suggestions?

Regards

Aidan

Best Answer

You also need to enter the "switch port-security" command so it would look like this:

interface GigabitEthernet1/0/1
 description Servers
 switchport access vlan 50
 switchport mode access
 switchport port-security
 switchport port-security mac-address sticky
 ip access-group xxxxxx in
 spanning-tree bpduguard enable

Thanks

Aidan