| conf t |
| enter into configuration mode |
| int fa0/1 |
| select interface |
| switchport port-security mac-address sticky |
| stores the mac addresses also in the running config, not only in mac table |
| switchport port-security maximum 2 |
| limit the MAC addresses for communication on this port |
| switchport port-security violation protect |
| setup protection in case of realizing new MAC addresses. Other options are shutdown or restrict (send notification). |
| exit |
| exit from configuration |
| sh port-security interface fa0/1 |
| check port security details of the interface |