< Home

display mac-address { blackhole | static | dynamic }

Function

The display mac-address command displays information about MAC address entries.

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

Format

display mac-address blackhole [ vlan vlan-id ]

display mac-address static [ interface-type interface-number | vlan vlan-id ] *

display mac-address dynamic [ [ interface-type interface-number | vlan vlan-id ] * ]

Parameters

Parameter Description Value

blackhole

Indicates a black-hole entry that does not age. After system reboot or hot swapping of the interface board, the black-hole table entries remain.

-

static

Indicates a static entry that cannot be aged. After system reboot or hot swapping of the interface board, the static table entries remain.

-

dynamic

Indicates a dynamic entry that can be aged. After system reboot or hot swapping of the interface board, the dynamic entries are lost.

-

vlan vlan-id

Specifies the VLAN ID.

-

interface-type interface-number

Specifies the type and number of the interface.

The acceptable interface types are GE interface, and Eth-Trunk interface.

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

A MAC address table is an interface-specific Layer 2 forwarding table. It stores information about the MAC addresses learned by the device. An entry in the table contains a MAC address, an interface associated with the MAC address, and VLAN information of the interface. To forward data, the device searches the MAC address table based on the destination MAC addresses carried in data packets to determine the outbound interfaces for the packets. Thus, broadcast is reduced.

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.

The display mac-address command can be run to check all MAC address entries in the system.

Precautions

If a device has a great number of MAC address entries, specifying a VLAN in the display mac-address command is recommended, which can filter the MAC address entries to be displayed. If a VLAN is specified, excess output information will be displayed, causing either of the following problems:
  • The displayed information is repeatedly refreshed, and thus required information cannot be located.
  • The system does not respond because of long-time information traverse and search.

Example

# Display static entries in VLAN 1.

[sysname] display mac-address static vlan 1
------------------------------------------------------------------------------- 
MAC Address    VLAN ID     Left Time(s)    Port            Type                  
------------------------------------------------------------------------------- 
0001-0001-0001 1           -               GE0/0/2         static                
------------------------------------------------------------------------------- 
Total items displayed = 1
Table 1 Description of the display mac-address command output

Item

Description

MAC Address

Indicates the MAC address.

VLAN ID

Indicates the VLAN to which the outgoing interface belongs.

Left Time(s)

Remained aging time, in seconds

Port

Indicates the outbound interface corresponding to the MAC address

Type

Indicates the type of MAC addresses. The value can be:
  • static: indicates static MAC address entries. Static MAC addresses are configured by users, and the entries will not be aged. They will remain in the MAC address table after the system is reset or the interface board is hot swapped.

  • blackhole: indicates blackhole MAC address entries. Blackhole MAC addresses are configured by users, and the entries will not be aged. They will remain in the MAC address table after the system is reset or the interface board is hot swapped.

  • dynamic: indicates dynamic MAC address entries. Dynamic MAC addresses can be configured by users or obtained by learning source MAC addresses. The entries will be aged, and they will be removed from the MAC address table after the system is reset or the interface board is hot swapped.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >