Port security changes the dynamic MAC addresses learned on an interface into secure MAC addresses. The switch performs predetermined actions after the number of secure MAC addresses reaches the limit. This function prevents unauthorized users from communicating with the switch using this interface and therefore enhances device security.