on Cisco 2950
interface fastethernet 0/24
switchport port-security
switchport port-security mac-address 00:ca:ff:ee:af:fe
switchport port-security maximum 3
switchport port-security violation restrict
or other
port security
port security action shutdown
port security aging time 2
port max-mac-count 2
!
!
mac-address-table secure 00CA.FFEE.AFFE FastEthernet 0/1 vlan 10
and for displaying
show port security