Port-Security

SW(config)#int fa0/1
SW(config-if)#switchport port-security
SW(config-if)#switchport port-security mac-address 2222.bbbb.3333

If you want to restart the port try use command "shutdown" and "no shutdown"

To allow mac-address that over than 2 addresses try to use this
SW(config-if)#switchport port-security maximum 3
SW(config-if)#switchport port-security mac-address 1111.1111.1111
SW(config-if)#switchport port-security mac-address 2222.2222.2222
SW(config-if)#switchport port-security mac-address 3333.3333.3333


SW(config-if)#switchport port-security mac-address sticky
above command are used to allow mac address that connect the switch in first time.

Functional On Security Reponse:
SW(config-if)#switchport port-security violation [protect | restrict | shutdown]
protect : no shutdown port
restrict : no shutdown port and report status to monitor or log server
shutdown : shutdown port