switchport port-security violation
To configure secure MAC address violation mode or the action to be taken if port security is violated, use the
switchport port-security violation command in interface configuration mode. To return to the default settings,
use the no form of this command.
switchport port-security violation {protect| restrict| shutdown| shutdown vlan}
no switchport port-security violation {protect| restrict| shutdown| shutdown vlan}
Syntax Description
Sets the security violation protect mode.protect
Sets the security violation restrict mode.restrict
Sets the security violation shutdown mode.shutdown
Sets the security violation mode to per-VLAN shutdown.shutdown vlan
Command Default
The default violation mode is shutdown.
Command Modes
Interface configuration
Command History
ModificationRelease
This command was introduced.Cisco IOS XE 3.3SECisco IOS XE 3.3SE
Usage Guidelines
In the security violation protect mode, when the number of port secure MAC addresses reaches the maximum
limit allowed on the port, packets with unknown source addresses are dropped until you remove a sufficient
number of secure MAC addresses to drop below the maximum value or increase the number of maximum
allowable addresses. You are not notified that a security violation has occurred.
We do not recommend configuring the protect mode on a trunk port. The protect mode disables learning
when any VLAN reaches its maximum limit, even if the port has not reached its maximum limit.
Note
In the security violation restrict mode, when the number of secure MAC addresses reaches the limit allowed
on the port, packets with unknown source addresses are dropped until you remove a sufficient number of
secure MAC addresses or increase the number of maximum allowable addresses. An SNMP trap is sent, a
syslog message is logged, and the violation counter increments.
In the security violation shutdown mode, the interface is error-disabled when a violation occurs and the port
LED turns off. An SNMP trap is sent, a syslog message is logged, and the violation counter increments. When
Command Reference, Cisco IOS XE Everest 16.5.1a (Catalyst 3650 Switches)
838
switchport port-security violation