SW1# conf t
SW1(config)# interface fastethernet0/1
SW1(config-if)# switchport mode access
SW1(config-if)# switchport port-security
SW1(config-if)# switchport port-security maximum 2
SW1(config-if)# switchport port-security violation restrict
SW1(config-if)# switchport port-security mac-address xxxx.xxxx.xxxa
SW1(config-if)# switchport port-security mac-address xxxx.xxxx.xxxb