No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Fat AP and Cloud AP V200R010C00 Command Reference

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
mac-address

mac-address

Function

The mac-address command adds a static MAC address entry or a blackhole MAC address entry.

The undo mac-address command deletes MAC address entries of a specified type.

Format

mac-address static mac-address interface-type interface-number vlan vlan-id

mac-address blackhole mac-address [ vlan vlan-id ]

undo mac-address blackhole [ mac-address ] [ vlan vlan-id ]

undo mac-address mac-address [ vlan vlan-id ]

undo mac-address static mac-address interface-type interface-number vlan vlan-id

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

Parameters

Parameter

Description

Value

blackhole

Indicates blackhole MAC address entries.

-

static

Indicates static MAC address entries, that is, MAC address entries configured manually.

-

mac-address

Specifies the source or destination MAC address in a MAC address entry.

The value is in H-H-H format. H is a hexadecimal number of 4 digits. The MAC address cannot be FFFF-FFFF-FFFF, 0000-0000-0000, or a multicast MAC address.

interface-type interface-number

Specifies the outbound interface in a MAC address entry.
  • interface-type specifies the type of the outbound interface.
  • interface-number specifies the number of the outbound interface.

-

vlan vlan-id

Specifies the ID of the VLAN that the outbound interface belongs to.

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

all

Deletes all MAC address entries.

-

dynamic

Deletes dynamic MAC address entries, that is, the MAC address entries learned by an interface.

-

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

MAC address entries are classified into the following types:
  • Dynamic MAC address entries that are learned by an interface after MAC address learning is enabled.

  • Static MAC address entries that are manually configured. They take precedence over dynamic MAC address entries.

  • Blackhole MAC address entries that are manually configured. A data frame is discarded if the source or destination MAC address matches a blackhole MAC address entry.

Functions of static and blackhole MAC address entries are:
  • Static MAC address entries prevent bogus packets with trusted device MAC addresses sent from attackers and guarantee communication between the wireless access point and the upstream device or server.
  • Blackhole MAC address entries prevent untrusted devices from attacking the wireless access point.
The undo mac-address command is used in the following scenarios:
  • The upstream device or server has changed or the untrusted device has been removed, and the corresponding static MAC address entry or blackhole MAC address entry needs to be deleted.
  • Dynamic address entries become invalid and need to be deleted to trigger MAC address relearning.

Prerequisites

The interface has been added to a VLAN.

Precautions

You can configure multiple static MAC address entries or blackhole MAC address entries by running the mac-address command multiple times.

If you configure a static or blackhole MAC address entry when the MAC table is full, the wireless access point processes the MAC address entry as follows:

  • If a dynamic MAC address entry with the same MAC address exists in the MAC address table, the wireless access point replaces the dynamic MAC address entry with the configured entry.
  • If no dynamic MAC address entry with the same MAC address exists in the MAC address table, the MAC address entries cannot be added to the MAC address table.

When using the undo mac-address command, pay attention to the following points:

  • If interface-type interface-number is not specified, MAC address entries of a specified type on all interfaces are deleted.
  • If vlan vlan-id is not specified, MAC address entries of a specified type in all VLANs are deleted.

Example

# Add a static MAC address entry to the MAC address table. The destination MAC address is 0003-0003-0003. The outbound interface is gigabitethernet0/0/1, which belongs to VLAN 4.

<Huawei> system-view
[Huawei] mac-address static 0003-0003-0003 gigabitethernet 0/0/1 vlan 4

# Configure a blackhole MAC address entry to discard the Ethernet frames whose destination MAC address is 0004-0004-0004 and VLAN ID is VLAN 5.

<Huawei> system-view
[Huawei] mac-address blackhole 0004-0004-0004 vlan 5
# Delete all dynamic MAC address entries.
<Huawei> system-view
[Huawei] undo mac-address dynamic
Translation
Download
Updated: 2019-11-21

Document ID: EDOC1100064352

Views: 194901

Downloads: 118

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next