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.
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 ]
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. |
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: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 actual command output varies according to the device. The command output here is only an example.
<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
<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
<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
<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
<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 ----------------------------------------------------------------------------------------------------------------------
<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 - -------------------------------------------------------------------------------
<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
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:
|
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 |
|
Aging time | Aging time of MAC address entries. |
LSP/MAC_Tunnel |
|
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 |
|
MacAccountingEnable | Whether MAC accounting is enabled. |
VLAN/VSI/BD/SI/EVPN |
|
Age | Dynamic MAC learned time in seconds. |
BD | BD domain. |