> # Port Guard

> The port guard feature is intended for use in environments where the system and application environment does not adapt quickly and efficiently to a port going down and back up, or to a port rapidly cycling up and down, which can happen in some failure modes. For example, if a system takes five seconds to stabilize after a port goes down, but the port is going up and down once a second, a more severe failure in the fabric might occur.

> The port guard feature gives the SAN administrator the ability to prevent this issue from occurring in environments that are vulnerable to these problems. The port can be configured to stay down after the first failure or after a specified number of failures in a specified time period. This allows the SAN administrator to intervene and control the recovery, avoiding any problems caused by the cycling.

> Using the port guard feature, you can restrict the number of error reports and bring a malfunctioning port to down state dynamically. A port can be configured to go into error-disabled state for specific types of failures.

> A general link failure caused by link-down is the superset of all other causes. The sum of the number of all other causes equals to the number of link-down link failures. This means a port is brought to down state when it reaches the maximum number of allowed link failures or the number of specific causes.

> The causes of link failure can be any of the following:

> - ESP trustsec-violation
> - Bit-errors
> - Signal loss
> - Sync loss
> - Link reset
> - Credit loss
> - Additional causes might be the following:
> - Not operational (NOS).
> - Too many interrupts.
> - Cable is disconnected.
> - Hardware recoverable errors.
> - The connected device rebooted (F ports only).
> - The connected linecard rebooted (ISL only).

> Copyright 2010-2013, Cisco Systems, Inc. All rights reserved.