error-down auto-recovery

Function

The error-down auto-recovery command configures the auto recovery function on a port to enable the port in the error-down state to automatically go Up, and sets the delay for the transition from Down to Up.

The undo error-down auto-recovery command disables the auto recovery function on the port.

By default, the auto recovery function is disabled on a port.

Format

error-down auto-recovery cause error-down-type interval interval-value

undo error-down auto-recovery cause error-down-type

Parameters

Parameter Description Value
interval interval-value

Specifies the auto recovery delay.

The value is an integer ranging from 30 to 86400, in seconds.

cause error-down-type

Specifies the cause of the error-down event.

The value is a string of characters. You can enter a question mark (?) and select a value from the displayed value range.

Currently, one of the following events may cause the Down event:

  • STP BPDU protection: bpdu-protection
  • l2-loop-occurred protection: l2-loop-occurred

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
interface-mgr write

Usage Guidelines

Usage Scenario

  • bpdu-protection:

    On a network running the Spanning Tree Protocol (STP), after BPDU protection is configured on an edge port, if attackers send pseudo BPDUs to attack a switching device, the switching device automatically makes the edge port go Down immediately after the edge port receives BPDUs. As a result, all services on the edge port are interrupted.

    By default, the port in the Down state can communicate with other ports only after the administrator manually turns it Up. If you expect the Down port to go Up automatically, run the error-down auto-recovery command to enable the auto recovery function on the port and set the delay time for the status transition from Down to Up.

    After a port goes Up, if it receives BPDUs again or the link is considered unavailable within a specific period, the port goes Down again.
  • l2-loop-occured:

    If the l2-loop-detect action shutdown command is run, a Layer 2 interface is automatically shut down when it encounters a loop. To allow the Layer 2 interface to automatically go up, run this command to enable the function of automatically changing the interface state to up.

Configuration Impact

After the error-down auto-recovery command is run, the port goes from Down to Up after the delay expires.

Precautions

There is no default value for the recovery time. Therefore, you must specify a delay when configuring this command.

If you run the error-down auto-recovery command to modify the auto-recovery delay, the modification will not take effect on the interface that has been in the error-down state due to a specific cause. The modification only takes effect on the interface that has gone Up from the error-down state.

A port enters the error-down state after being shut down due to an error.

Example

# After the function is enabled, set the interval for an interface to automatically go Up to 50 seconds.
<HUAWEI> system-view
[~HUAWEI] error-down auto-recovery cause xxx interval 50
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >