Port security is feature that enable permit or deny traffic for end user PCs connected to access layer switch. Port security enable specify a group of valid MAC address on port. If maximum secure MAC address is reached then security violation modes lead to protect, restrict or shutdown of port.
There are 3 ways how to configure port security:
1) Static secure MAC addresses - manually configured with
switchport port-security mac-address MAC_ADDRESS