Per access port: learn/limit MACs, act on violations. Default violation mode is shutdown (err-disable); protect drops silently, restrict drops and logs.

interface Gi1/0/1
 switchport mode access
 switchport port-security
 switchport port-security maximum 2
 switchport port-security mac-address sticky
 switchport port-security violation shutdown
 switchport port-security aging time 10 type inactivity

Verify: show port-security interface, show port-security address.