< Home

mac-address flapping action

Function

The mac-address flapping action command configures the action to perform on an interface when MAC address flapping is detected on the interface.

The undo mac-address flapping action command deletes the action.

By default, the system does not perform any action when detecting MAC address flapping on an interface.

Format

mac-address flapping action { error-down | quit-vlan }

undo mac-address flapping action { error-down | quit-vlan }

Parameters

Parameter

Description

Value

error-down

Shuts down an interface when MAC address flapping is detected on the interface.

-

quit-vlan

Removes an interface from the VLAN where MAC address flapping occurs when MAC address flapping is detected on the interface.

-

Views

Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, 100GE interface view, MultiGE interface view, Eth-Trunk interface view, port group view, 25GE interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When the switch connects to a user network that does not support loop prevention protocols, configure a loop prevention action for the switch to perform when detecting MAC address flapping. This reduces the impact of MAC address flapping on the user network.

When MAC address flapping occurs on an interface with a loop prevention action configured, the switch performs the configured action. When the action is set to error-down, the switch shuts down the interface. When the action is set to quit-VLAN, the switch removes the interface from the VLAN where MAC address flapping occurs. Only one interface can be shut down during one aging time configured by the mac-address flapping aging-time command.

Follow-up Procedure

  • When the action is set to error-down, the interface cannot be automatically restored after it is shut down. You can only restore the interface by running the shutdown and undo shutdown commands or the restart command in the interface view.

    To enable the interface to go Up automatically, you must run the error-down auto-recovery cause mac-address-flapping command in the system view before the interface enters the error-down state. This command enables an interface in error-down state to go Up and sets a recovery time. The interface goes Up automatically after the time expires.

  • If the action is set to quit-vlan, the interface can be automatically restored after a specified time period after it is removed from the VLAN. The default recovery time is 10 minutes. The recovery delay time can be set using the mac-address flapping quit-vlan recover-time time-value command in the system view.

Precautions

Do not run the mac-address flapping action command on uplink interfaces.

MAC address flapping detection can only detect loops on interfaces, but cannot obtain the entire network topology. If the user network connected to the switch supports loop prevention protocols, use the loop prevention protocols instead of MAC address flapping detection.

If you run the mac-address flapping action command multiple times in the same interface view, only the latest configuration takes effect.

Example

# Configure the switch to shut down GE0/0/1 when detecting MAC address flapping on the interface.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] mac-address flapping action error-down
Info: This command may shut down the interface after MAC address flapping is detected. 

# Configure the switch to remove GE0/0/1 from the VLAN where MAC address flapping occurs.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] mac-address flapping action quit-vlan 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >