Cisco – Why Use Port Security Mode ‘Protect’?

ciscocisco-catalystcisco-iosport-securityswitch

Port security offers three violation mode options:

protect—Drops packets with unknown source addresses until you remove a sufficient number of secure MAC addresses to drop below the maximum value.
restrict—Drops packets with unknown source addresses until you remove a sufficient number of secure MAC addresses to drop below the maximum value and causes the SecurityViolation counter to increment.
shutdown—Puts the interface into the error-disabled state immediately and sends an SNMP trap notification.

Protect and restrict behave the same w/r/t forwarding behavior, but restrict generates log messages and a counter, and protect does not. I can't see why I wouldn't want that information, in case I need to troubleshoot or verify operation.

Is this just a case of an old option hanging around despite a newer and better alternative? Or is there some scenario I'm not thinking of where the log entries and counters would be a problem?

Best Answer

It really depends on your philosophy and resources. You can quickly fill a switch log with violations, making it hard to troubleshoot real problems (switch logs can only be so big). You really need to use a separate logging server with something like this.

You want to log violations. To some people it is enough to just drop the traffic. In some cases, the extra overhead and traffic of logging a lot of violations is too much, or they may not have the logging infrastructure necessary to take advantage of it. The three different modes give you the flexibility to choose.