After port security is enabled on an interface by using the port-security enable command, MAC address entries learned by the interface are stored in the MAC address table as secure dynamic MAC address entries. The learned secure dynamic MAC address entries are deleted when the device restarts.
After configuring the port security function, you can run the display mac-address security command to check whether the learned secure dynamic MAC address entries are correct.
The undo port-security enable command disables the port security function on an interface.