liveBook · Manning

Violation mode

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

switchport port-security violation mode is a Cisco IOS switch-port command that configures the response to a port-security violation.

Port-security violation mode determines how a Cisco IOS switch port responds when a frame exceeds its allowed secure-MAC limit. The default shutdown mode error-disables the port, which maximizes security but can interrupt an essential service. section 12.2.1

Choose among three per-port responses:

  • shutdown discards violating frames, error-disables the port, increments the violation counter, and generates Syslog/SNMP notifications for the first violation. section 12.2.1
  • restrict discards violating frames while keeping the port up; it increments the violation counter and generates Syslog/SNMP notifications. section 12.2.1
  • protect silently discards violating frames without error-disabling the port, incrementing the counter, or generating notifications. section 12.2.1

Configure and verify modes

SW1(config)# interface f0/2 SW1(config-if)# switchport port-security violation restrict SW1(config-if)# interface f0/3 SW1(config-if)# switchport port-security violation protect SW1(config-if)# do show port-security The Security Action column displays Restrict or Protect. Fa0/1 displays the default Shutdown action.

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Distinguishes three actions, notification differences, configuration syntax, and show-port-security verification.
Examples
Uses Fa0/2 with restrict, Fa0/3 with protect, and Fa0/1 retaining the default shutdown action.
What it assumes
Assumes port security is enabled and a secure-MAC limit exists; explains violations as frames from unauthorized MAC addresses.
What you can do after
Configure and verify per-port violation handling with switchport port-security violation and show port-security.
How it connects
Connects port security with secure MAC addresses, MAC-address limits, error-disabled ports, Syslog, and SNMP notifications.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.