.
.

Configure port security on the Switch

This tutorial is example for Configure port security on the Switch

Host1 C:\> ping 192.168.1.2
Host1 C:\>ipconfig
Switch#enable
Switch#class (password)

Switch#show mac-address-table (display MAC address table)

Switch#configure terminal (entry in global config mode)
Switch(config)#mac-address-table static 00e0.2917.1884 vlan 1 interface fastethernet 0/4 (Setting a static MAC address on Fast Ethernet 0/4 in VLAN 1)
Switch#exit

Switch#show mac-address-table
Switch#show running-config

Switch#configure terminal
(entry in global config mode) 
 Switch(config)#interface fastethernet 0/4 (entry in config mode FA 0/4)
Switch(config-if)#switchport mode access (set port to access mode)
Switch(config-if)#switchport port-security (activate port security)
Switch(config-if)#switchport port-security maximum 1 (setting port security on MAX MAC COUNT 1)
Switch(config-if)#switchport port-security violation shutdown (disable the port in case of unauthorized access over the respective ports)
Switch(config-if)#exit (exit from config mode FA 0/4)
Switch(config)#exit
(exit from global config mode)
Switch#show interface fastethernet 0/4

Switch#configure terminal
Switch(config)#interface fastethernet 0/4 (entry in config mode FA 0/4)
Switch(config-if)#no shutdown (activate port fa 0/4)