display mac-address { mac-address bridge-domain bd-id | bridge-domain bd-id } [ verbose ]
display mac-address blackhole bridge-domain bd-id [ verbose ]
display mac-address dynamic-blackhole bridge-domain bd-id [ verbose | last-change ]
display mac-address static { bridge-domain bd-id [ interface-type interface-number | interface-name ] | { interface-type interface-number | interface-name } bridge-domain bd-id } [ verbose ]
display mac-address dynamic [ ineffective ] { bridge-domain bd-id [ verbose | last-change ] | slot slot-id bridge-domain bd-id [ verbose | last-change ] }
display mac-address sticky [ bridge-domain bd-id ] [ verbose ]
Parameter | Description | Value |
---|---|---|
interface-type |
Specifies the interface type. |
- |
interface-number |
Specifies the interface number. |
- |
interface-name |
Specifies the interface name. |
- |
blackhole |
Displays information about blackhole MAC address entries. |
- |
static |
Displays information about static MAC address entries. |
- |
ineffective |
Specifies the invalid MAC address. |
- |
last-change |
Displays the time when dynamic MAC address entries are updated for the last time. |
- |
dynamic-blackhole |
Displays information about dynamic blackhole MAC address entries. |
- |
sticky |
Displays information about sticky MAC address entries. |
- |
mac-address |
Specifies a MAC address. |
The value is in the format of H-H-H. Each H is a hexadecimal number of 1 to 4 digits, such as 00e0 and fc01. If an H contains fewer than 4 digits, the left-most digits are padded with zeros. For example, e0 is displayed as 00e0. A MAC address cannot be set to all 0s or 1s. |
bridge-domain bd-id |
Displays MAC address entries in a bridge domain with a specified ID. |
The value is an integer ranging from 1 to 16777215. |
verbose |
Displays detailed information about MAC address entries. |
- |
dynamic |
Displays information about dynamic MAC address entries. |
- |
slot slot-id |
Specifies the slot ID. |
- |
Usage Scenario
A MAC address table is a port-based Layer 2 forwarding table. It stores MAC addresses of other devices learned by a device, including MAC addresses and ports associated with the MAC addresses. When forwarding packets, the device searches the MAC address table for the outbound interface based on the destination MAC address in the packets to reduce the number of broadcast packets.
MAC address entries are classified into the following types:The actual command output varies according to the device. The command output here is only an example.
<HUAWEI> display mac-address bridge-domain 100 verbose MAC address table of slot 9: ------------------------------------------------------------------------------------------------ MAC Address: 00e0-fc12-3456 VLAN/BD/VSI/SI/EVPN: BD 100 Port : GE0/1/1.1 Type : dynamic PEVLAN : 100 CEVLAN : - TrustFlag : - TrustPort : - Peer IP : - VC-ID : - Aging time : 300 LSP/MAC_Tunnel : 9/0 TimeStamp : 5917 MacAccountingEnable: Disable MAC address used as destination: Packet count : 1 Byte count : 128 MAC address used as source: Packet count : 2 Byte count : 256 ---------------------------------------------------------------------------------------------------------------------- Total matching items on slot 9 displayed = 1
<HUAWEI> display mac-address 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 6 - - - blackhole - 00e0-fc12-3457 7 - - - blackhole - 00e0-fc12-3457 8 - - - blackhole - 00e0-fc12-3457 9 - - - blackhole - 00e0-fc12-3457 10 - - - blackhole - 00e0-fc12-3457 11 - - - blackhole - 00e0-fc12-3457 12 - - - blackhole - 00e0-fc12-3457 54 - - GE0/1/1 static - 00e0-fc12-3463 200 - - GE0/1/1 static - 00e0-fc12-3462 v1 54 - GE0/1/2.1 static - 00e0-fc12-3461 vsa 3 4 GE0/1/2.1 static - 00e0-fc12-3460 vsa 4094 4094 GE0/1/2.2 static - ------------------------------------------------------------------------------- Total matching items on slot 1 displayed = 12
<HUAWEI> display mac-address dynamic-blackhole bridge-domain 1 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 - - - dyn-blackhole - ------------------------------------------------------------------------------- Total matching items on slot 1 displayed = 1
<HUAWEI> display mac-address sticky
MAC address table of slot 9:
----------------------------------------------------------------------------------------------------------------------
MAC Address VLAN/BD/ PEVLAN CEVLAN Port/Peerip Type LSP/LSR-ID
VSI/SI/EVPN MAC-Tunnel
----------------------------------------------------------------------------------------------------------------------
00e0-fc12-3456 BD 10 - - Eth-Trunk10.10 sticky 9/16385
00e0-fc12-3457 BD 10 - - 10.1.1.1 sticky/static 9/-
00e0-fc12-3456 BD 20 20 - Eth-Trunk10.20 sticky 9/-
00e0-fc12-3457 BD 20 20 - Eth-Trunk10.20 sticky 9/-
00e0-fc12-3460 BD 20 20 - Eth-Trunk10.20 sticky 9/-
00e0-fc12-3461 BD 20 20 - Eth-Trunk10.20 sticky 9/-
00e0-fc12-3462 BD 20 20 - Eth-Trunk10.20 sticky 9/-
----------------------------------------------------------------------------------------------------------------------
Total matching items on slot 9 displayed = 7
Item | Description |
---|---|
MAC address table of slot | Slot ID of the interface board that dynamically learns MAC addresses. |
MAC Address | Learned MAC addresses. |
MAC address used as destination/source | Traffic statistics are collected based on the destination or source MAC address. |
Port | Outbound interface which sends packets to the MAC address. |
Type | Type of the MAC address.
|
PEVLAN | Single VLAN tag or outer VLAN tag. This field is meaningless on an EVPN and is always displayed as a hyphen (-). |
CEVLAN | Inner VLAN tag carried in the packets received by the interface. On an EVPN, this item has no meaning and therefore is always displayed as a hyphen (-). |
TrustFlag | Trust flag. |
Peer IP | Peer IP address. |
VC-ID | VC ID. |
Aging time | Aging time of the MAC address entries. |
LSP/MAC_Tunnel | -LSP: indicates the information about the board to which the MAC address belongs. For example, 1 indicates that the MAC address is learned by the board in slot 1. -MAC-Tunnel: indicates the name of a tunnel. This field exists in a MAC address entry for a specific SI. |
Packet count | Number of packets received by an interface. |
Byte count | Number of bytes received by the interface. |
Byte count | Number of bytes received by the interface. |
Total matching items on slot ID | Total number of MAC address entries that match specific rules. |
Port/Peerip | Outbound interface or peer IP address mapped to a learned MAC address. |
VLAN/BD/VSI/SI/EVPN | VLAN/BD/VSI/SI/EVPN to which the outbound interface belongs.
|
LSP/LSR-ID/MAC-Tunnel |
|
MacAccountingEnable | Whether MAC accounting is enabled. |
Last Change | Date and time when a dynamic MAC address entry was last updated. |
Trustport | Trusted interface. |
Timestamp | Timestamp. |