You may use the following method to configure port security on a Cisco switch. Additionally, this configuration will not use the switchport port-security violation {protect | restrict | shutdown} command in order to accept the default action of shutdown.

1. Verify the existing configuration, if any, exists on the switch port.

01

 

 

2. Navigate to the interface configuration prompt of the interface you would like to configure.

02

 

 

 

3. Enter the switchport mode access command.

03

 

 

 

 

4. Enter the switchport port-security command to enable port security.

04

 

 

 

 

5. Enter the switchport port-security maximum x command to define the maximum number of MAC addresses to define where x is the number of MAC address to define. The default value is to accept a maximum of (1) MAC address. In this example the maximum number is (2).

05

 

 

 

 

6. Enter the switchport port-security mac-address sticky to allow the switch to dynamically learn the first (2) MAC addresses.

06

 

 

 

 

 

7. Verify the port security configuration using the show running-config command or the show port-security interface FastEthernet 0/1 command.

07-1

 

 

 

07-2

 

 

 

 

 

 

 

 

 

Enjoy!