> # Configuring Port Guard

> To enable port guard using DCNM-SAN, follow these steps:

> 1. Expand Switches > FC Interfaces > Physical > Port Guard from the Physical Attributes pane.

> You see the interfaces listed in the Information pane.

> 2. Click the Link Down tab and then select a switch or port.
> 3. Check the check box in the Enable column.
> 4. (Optional) Enter the Duration in seconds and the number of flaps. If the values are 0, the port is brought to down state if the link flaps even once. Otherwise, the link is brought to down state if the link flaps for the number of flaps within the duration.
> 5. Click Apply Changes to activate the configuration.
> 6. Click the TrustSec Violation tab, and then select a switch or port.
> 7. Check the check box in the Enable column.
> 8. (Optional) Enter the duration in seconds and the number of flaps. If the values are 0, the port is brought to down state if a trustsec violation occurs even once. Otherwise, the link is brought to down state if there is trustsec violation for the number of flaps within the duration.
> 9. Click the Bit Errors, Signal Loss, Sync Loss, Link-reset, and Credit Loss tabs and complete the port guard configuration.
> 10. Click Apply Changes to activate the configuration.

> To enable port guard for single or multiple interfaces using Device Manager, follow these steps:

> 1. Expand Switches > FC Interfaces > Physical > Port Guard from the Physical Attributes pane.

> You see the FC Interfaces listed.

> 2. Click the Link Down tab, and then select the switch or port.
> 3. Check the check box in the Enable column.
> 4. (Optional) Enter the duration in seconds and the number of flaps. If the values are 0, the port goes into a down state even if the link flaps once. Otherwise, the link goes into a down state if the link flaps for the number of flaps within the duration.
> 5. Click Apply Changes to activate the configuration.
> 6. Click the TrustSec Violation tab, and then select the switch or port.
> 7. Check the check box in the Enable column.
> 8. (Optional) Enter the Duration in seconds and the number of flaps. If the values are 0, the port is brought to down state if a trustsec violation occurs even once. Otherwise, the link is brought to down state if a trustsec violation occurs for the number of flaps within the duration.
> 9. Click Apply Changes to activate the configuration.

> ## Troubleshooting Tips

> - Link down is the superset of all other causes. A port is brought to down state if the total number of other causes equals to the number of allowed link-down failures.
> - Even if the link does not flap due to failure of the link, and port guard is not enabled, the port goes into a down state if too many invalid FLOGI requests are received from the same host.

> Note By default, the port monitor port guard is disabled. To enable this feature, you must explicitly configure the port monitor port guard feature on a particular counter by performing Step 3 or Step 4.

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