Configuring a Security Violation Action
Command or Action
Step 6
(Optional) copy running-config startup-config
Example:
switch(config-if)# copy running-config
startup-config
Configuring a Security Violation Action
You can configure the action that the device takes if a security violation occurs. The violation action is
configurable on each interface that you enable with port security.
The default security action is to shut down the port on which the security violation occurs.
Before you begin
You must have enabled port security globally.
SUMMARY STEPS
1. configure terminal
2. Enter one of the following commands:
3. [no] switchport port-security violation {protect | restrict | shutdown}
4. (Optional) show running-config port-security
5. (Optional) copy running-config startup-config
DETAILED STEPS
Command or Action
Step 1
configure terminal
Example:
switch# configure terminal
switch(config)#
Step 2
Enter one of the following commands:
• interface ethernet slot/port
• interface port-channel channel-number
Example:
switch(config)# interface ethernet 2/1
switch(config-if)#
Step 3
[no] switchport port-security violation {protect | restrict
| shutdown}
Example:
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
322
• interface ethernet slot/port
• interface port-channel channel-number
Purpose
Copies the running configuration to the startup
configuration.
Purpose
Enters global configuration mode.
Enters interface configuration mode for the interface that
you want to configure with a security violation action.
Configures the security violation action for port security on
the current interface. The no option resets the violation
action to the default, which is to shut down the interface.
Configuring Port Security