display mac-address (All views)

Function

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

The display mac-address dynamic command displays dynamic MAC address entries on an network.

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

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

The display mac-address limit-table command displays information about MAC address entries whose maximum number is limited using the mac-limit command.

The display mac-address dynamic-blackhole command displays dynamic black-hole MAC address entries.

Format

display mac-address mac-address { [ vlan vlan-id ] | [ vsi vsi-name [ ce-vlan ] ] | [ ce-vlan ] } [ verbose ]

display mac-address { [ vlan vlan-id ] | [ vsi vsi-name [ ce-vlan ] ] | [ ce-vlan ] } [ verbose ]

display mac-address dynamic [ ineffective ] [ slot slot-id ] vlan vlan-id [ verbose | last-change ]

display mac-address blackhole { [ vlan vlan-id ] | [ vsi vsi-name ] } [ { verbose | { effective [ slot slot-id ] } } * ]

display mac-address static { { [ vlan vlan-id ] | [ interface-type interface-number | interface-name ] } * | [ vsi vsi-name ] } [ { verbose | { effective [ slot slot-id ] } } * ]

display mac-address limit-table interface { interface-type interface-number | interface-name } [ vlan vlan-id ]

display mac-address limit-table vsi vsi-name pw pw-name

display mac-address pbb [ last-change ]

display mac-address dynamic [ ineffective ] [ slot slot-id ] evpn evpn-name [ verbose | last-change ]

display mac-address dynamic-blackhole [ evpn evpn-name ] [ verbose | last-change ]

display mac-address evpn evpn-name [ verbose | last-change ]

display mac-address mac-address evpn evpn-name [ verbose | last-change ]

Parameters

Parameter Description Value
mac-address

Displays a specified MAC address entry.

The value is in the format of H-H-H. H is a 4-digit hexadecimal number, such as 00e0. If an H contains less than four hexadecimal digits, 0s are padded ahead. For example, if an H is e0, it is equal to 00e0.

vlan vlan-id

Displays the MAC address entries in a specified VLAN.

If no VLAN is specified, all MAC address entries in the system are displayed.

The value is an integer ranging from 1 to 4094.

vsi vsi-name

Displays the static MAC entries in a specified Virtual Switching Instance (VSI).

If no VSI is specified, the static MAC address entries of all VSIs are displayed.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

ce-vlan

Displays the inner tag carried in the packets received by the QinQ stacking sub-interface.

-

verbose

Displays detailed information of the static MAC address entries.

-

ineffective

Displays dynamic MAC address entries of ineffective on an EVPN.

-

slot slot-id

Specifies the slot ID.

-

last-change

Displays the date and time when MAC address entries on a specified EVPN are last updated.

-

effective

Displays effective static MAC address entries or static blackhole MAC address entries.

-

interface-type

Specifies the interface type.

-

interface-number

Specifies the interface number.

-

interface-name

Specifies the interface name.

-

pw pw-name

Displays the MAC address learning rule in the specified pseudowire (PW).

The value is a string of 1 to 15 case-sensitive characters, and cannot contain spaces. If spaces are used, the string must start and end with double quotation marks (").

pbb

Displays the MAC address entries of a PBB (Provider backbone bridge).

-

evpn evpn-name

Specifies an EVPN name.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

All views

Default Level

1: Monitoring level

Task Name and Operations

Task Name Operations
mac read

Usage Guidelines

Usage Scenario

A MAC address table is an interface-based Layer 2 forwarding table. It stores information about MAC addresses learned by a device. A MAC address entry contains a MAC address, an interface on which a packet is forwarded to this MAC address, and a VLAN to which the specified interface belongs or a VSI to which the specified interface is bound. Before forwarding a packet, the device searches the MAC address table based on the destination MAC address of the packet and locate the outbound interface quickly. This facilitates packet forwarding and reduces broadcast traffic.

MAC address entries are divided into the following types:

  • Static MAC address entries: configured by users and used to forward packets with specified destination MAC addresses. Static MAC address entries protect a device against attacks of forged MAC addresses and will not be aged.
  • Dynamic MAC address entries: obtained by a device through source MAC address learning and will be aged based on the aging time.
  • Static blackhole MAC address entries: manually configured by users. To prevent invalid MAC address entries (for example, those of unauthorized users) from occupying the MAC address table and prevent hackers from attacking a device or network using forged MAC addresses, MAC addresses of untrusted users can be configured as static blackhole MAC addresses. A device discards packets destined for the static blackhole MAC addresses. These address entries do not age out.
  • Dynamic blackhole MAC address entries: obtained by a device through learning source MAC addresses. On an EVPN network, to prevent MAC address entries from frequently flapping, the MAC address entries can be set to dynamic blackhole entries, so that related interfaces are blocked, and loops are rapidly eliminated. These address entries do not age out.

    To view information about all MAC address entries on the device, run the display mac-address command.

Prerequisites

Static blackhole MAC address entries have been configured using the mac-address blackhole command in the system view.

The static MAC address entries have been configured using the mac-address static command.

Precautions

If the MAC address table of a device contains a large number of MAC address entries, specifying a VLAN in the display mac-address command is recommended; Otherwise, excess output information may cause the following problems:

  • The displayed information is repeatedly refreshed, and required information cannot be obtained.
  • The system does not respond because of long-time information traversing and searching.

    MAC address learning must be enabled on the device; otherwise, dynamic MAC address entries cannot be displayed using the display mac-address dynamic command.

    If a device has learned a great number of static MAC address entries, specifying a VLAN in the display mac-address static command is recommended; otherwise, the excess output information may cause the following problems:
  • The displayed information is repeatedly refreshed, and required information cannot be obtained.
  • The system does not respond because of long-time information traversing and searching.

Example

The actual command output varies according to the device. The command output here is only an example.

# Display dynamic MAC address entries of VLAN 200.
<HUAWEI> display mac-address dynamic vlan 200
MAC address table of slot 1:
-------------------------------------------------------------------------------
MAC Address    VLAN/BD/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID
               VSI/SI/EVPN                                            MAC-Tunnel
-------------------------------------------------------------------------------
00e0-fc12-3460 1              -      -      GE0/1/17         dynamic   -
-------------------------------------------------------------------------------
Total matching items on slot 1 displayed = 1
# Display all static blackhole MAC address entries.
<HUAWEI> display mac-address blackhole
MAC address table of slot 1:
-------------------------------------------------------------------------------
MAC Address    VLAN/BD/       PEVLAN CEVLAN Port      Type      LSP/LSR-ID
               VSI/SI/EVPN                                            MAC-Tunnel
-------------------------------------------------------------------------------
00e0-fc12-3456 1              -      -      -               blackhole -
-------------------------------------------------------------------------------
Total matching items on slot 1 displayed = 1
# Display the detailed information about all MAC address entries.
<HUAWEI> display mac-address verbose
BD: bridge-domain    Age: dynamic MAC learned time in seconds
MAC address table:
-------------------------------------------------------------------------------
MAC Address: 00e0-fc12-3458      VLAN/VSI/BD        : 1/-/-                     
Type       : dynamic             Learned-From       : GE0/1/1                 
PEVLAN     : 1                   CEVLAN             : -                         
Aging time : 258866            
MAC Address: 00e0-fc12-3459      VLAN/VSI/BD        : 10/-/-                    
Type       : static              Learned-From       : GE0/1/2                   
PEVLAN     : 10                  CEVLAN             : -                         
Aging time : -                             
-------------------------------------------------------------------------------
Total items displayed = 3
# Displays detailed information on all MAC address entries of VLAN 10.
<HUAWEI> display mac-address 00e0-fc12-3459 vlan 10 verbose
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address: 00e0-fc12-3459      VLAN/BD/VSI/SI/EVPN: 10                        
Port       : Eth0/1/0            Type               : static                    
PEVLAN     : -                   CEVLAN             : -                         
Aging time : -                   LSP/MAC_Tunnel     : -                         
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 1
# Display the date and time when MAC address entries on a specified EVPN were last updated.
<HUAWEI> display mac-address evpn 1 last-change
MAC address table of slot 1:
----------------------------------------------------------------------------------------------------------------------
MAC Address    VLAN/BD/                        PEVLAN CEVLAN Port/Peerip            Type          Last Change
               VSI/SI/EVPN
----------------------------------------------------------------------------------------------------------------------
00e0-fc12-3457 1                               1      -      GE0/1/22.1              dynamic   Jan 26 2018 10:20:39
----------------------------------------------------------------------------------------------------------------------
# Display MAC address entries on an EVPN.
<HUAWEI> display mac-address evpn 123
MAC address table of slot 1:
-------------------------------------------------------------------------------
MAC Address    VLAN/BD/    PEVLAN CEVLAN Port/Peerip    Type      LSP/LSR-ID
               VSI/SI/EVPN                                         MAC-Tunnel
-------------------------------------------------------------------------------
00e0-fc12-3456 evpn123     -      -      GE0/1/1        dynamic    -
-------------------------------------------------------------------------------
# Display detailed information about the effective static MAC address entries.
<HUAWEI> display mac-address static vsi vsi1 effective verbose
MAC address table of slot 1:
-------------------------------------------------------------------------------
MAC Address: 00e0-fc12-3456      VLAN/BD/VSI/SI/EVPN: 1                         
Port       : GE0/1/26.1           Type               : static                   
PEVLAN     : 1                   CEVLAN             : -                         
TrustFlag  : 0                   TrustPort          : -                         
Peer IP    : -                   VC-ID              : -                         
Aging time : 300                 LSP/MAC_Tunnel     : 9/-                       
TimeStamp  : 2123                
MacAccountingEnable: Enable
MAC address used as destination:
Packet count:       1               Byte count:         123
MAC address used as source:
Packet count:       2               Byte count:         256
-------------------------------------------------------------------------------
Total matching items on slot 1 displayed = 1
Table 1 Description of the display mac-address (All views) command output
Item Description
MAC Address

MAC address in a specific entry.

MAC address table of slot

Slot number of an interface board that dynamically learns MAC addresses.

MAC address used as destination/source

Traffic statistics collection is based on a source or destination MAC address.

MAC address table

MAC address table in a specific entry.

PEVLAN

Single VLAN tag or outer VLAN tag.

No meaning on an EVPN and always displayed as a hyphen (-).

CEVLAN

Inner VLAN tag.

No meaning on an EVPN and always displayed as a hyphen (-).

Port

Outbound interface which sends packets to the MAC address.

Type

Types of MAC address entries:

  • static: Static MAC address entries which are configured by users. They will not age out. They remain in the MAC address table after the system is restarted or an interface board is hot swapped.
  • blackhole: Static blackhole MAC address entries which are configured by users. They will not age out. They remain in the MAC address table after the system is restarted or an interface board is hot swapped.
  • dynamic: Dynamic MAC address entries which are obtained by learning source MAC addresses. They will age out after the aging time expires. They are removed from the MAC address table after the system is restarted or an interface board is hot swapped.
  • dyn-blackhole: indicates dynamic blackhole MAC address entries. Dynamic blackhole MAC addresses are configured by users, and the entries will not be aged. They are removed from the MAC address table after the system is restarted or an interface board is hot swapped.
Total items

Total number of static MAC address entries that are displayed.

Total matching items on slot 1 displayed

Total number of static MAC address entries that are displayed.

VLAN/VSI/BD

VLAN, BD or VSI to which the outbound interface belongs.

Learned-From
  • Static MAC address configured on this interface when the MAC address type is static.
  • MAC address learned on this interface when the MAC address type is dynamic.
  • A hyphen (-) is displayed when the MAC address type is blackhole.
Aging time

Aging time of MAC address entries.

LSP/MAC_Tunnel
  • LSP: information about the board that learns the MAC address.

    For example, 1/- indicates that the MAC address is learned by the board in slot 1.

  • MAC-Tunnel: the name of a tunnel. This field exists in a MAC address entry for a specific SI.
Port/Peerip

Outbound interface or peer IP address mapped to a learned MAC address. If this MAC address belongs to the public network, this field displays Peer IP of the remote device.

A hyphen (-) is displayed when the MAC address type is blackhole.

Last Change

Date and time when MAC address entries on an EVPN were last updated.

TrustFlag

Flag indicating that whether a trusted interface is generated after MAC flapping.

TrustPort

Trusted interface that is generated after MAC flapping.

Peer IP

IPv4 address of a peer.

VC-ID

Virtual circuit (VC) ID.

This field is displayed only when a VC ID is specified.

TimeStamp

How long a MAC address has been learned (in seconds).

Packet count

Number of packets received on an interface.

Byte count

Number of bytes received on an interface.

LSP/LSR-ID/MAC-Tunnel
  • LSP(local store pointer): indicates the board to which the MAC address belongs.
  • LSR-ID: indicates the learning information allocated by the MAC address.

    For example, 1/- indicates that the MAC address belongs to the board in slot 1 and the allocated learning information is null.

  • MAC-Tunnel: indicates a tunnel name. This field exists in a MAC address entry for a specific SI.

    On an EVPN, this item has no meaning and therefore is always displayed as a hyphen (-).

MacAccountingEnable

Whether MAC accounting is enabled.

VLAN/VSI/BD/SI/EVPN
  • VLAN: ID of the VLAN to which the outbound interface belongs.
  • VSI: name of the VSI to which the outbound interface belongs.
  • BD: ID of the BD to which the outbound interface belongs.
  • SI: name of the SI to which the outbound interface belongs.
  • EVPN: name of the EVPN instance to which the outbound interface belongs.
Age

Dynamic MAC learned time in seconds.

BD

BD domain.

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