Command
Switchport Port-Security
Use
Enables port security on an interface and sets default actions. The defaults are: max mac address is 1 and the violate action is shutdown the port.
Syntax
Switch(config-if)#switchport port-security
Example
In this example, port security is configured for int fa0/2 on SW3. Note that, since port-security will only work on interfaces in access mode,
the command switchport mode access is issued before enabling port-security.
SW3(config-if)#int fa0/2 |
Next, another device is connected to the port, which triggers a violation and causes fa0/2 to be shutdown.
SW3(config-if)# |