< Home

undo mac-address all

Function

The undo mac-address all command deletes the static, dynamic, and blackhole MAC address entries.

Format

undo mac-address all [ interface-type interface-number | vlan vlan-id ] *

Parameters

Parameter Description Value

interface-type interface-number

Specifies the type and number of the interface.

The interface can be a GE interface, or an Eth-Trunk interface.

vlan-id

Specifies the ID of a VLAN.

The value is an integer that ranges from 1 to 4094.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

MAC address entries are classified into the following types:
  • Blackhole MAC address entries: They are used to discard packets with specified source or destination MAC addresses. Blackhole MAC address entries are configured by users and will not be aged.
  • Static MAC address entries: They are configured by users and will not be aged.
  • Dynamic MAC address entries: They are configured by users or obtained by learning source MAC addresses. The entries will be aged.

To delete the previous MAC address entries, you can run the following commands.

  • The undo mac-address all vlan command deletes all the VLAN-based MAC address entries.

  • The undo mac-address all interface-type interface-number command deletes all the port-based MAC address entries.

  • The undo mac-address all interface-type interface-number vlan command deletes all the port-based and VLAN-based MAC address entries. The interface specified in interface-type interface-number must reside in the VLAN specified in vlan. To delete the MAC address entries successfully, you must create the VLAN first.

  • If no parameter is specified, all the MAC entries of the system are displayed.

Example

# Delete all MAC entries generated in VLAN1.

<sysname> system-view
[sysname] undo mac-address all vlan 1 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >