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.
