< Home

display mac-address

Function

The display mac-address command displays the MAC address table of the switch. A MAC address entry contains the destination MAC address, VLAN ID/VSI/BD, outbound interface, and entry type.

Format

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

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

Parameters

Parameter

Description

Value

mac-address

Specifies the destination MAC address in an entry.

The value is in H-H-H format. H is a hexadecimal number of 4 digits, for example, 00e0 and fc01. If you enter less than four digits, 0s are prefixed to the input digits. For example, if you enter e0, the system changes e0 to 00e0. The MAC address cannot be FFFF-FFFF-FFFF, 0000-0000-0000, or a multicast MAC address.

vlan vlan-id

Displays MAC address entries in a specified VLAN.

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

vsi vsi-name

Displays MAC address entries in a specified VSI.

NOTE:

Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730S-H, and S6730-H support this parameter.

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.

interface-type interface-number

Displays the MAC address entries with a specified outbound interface.
  • interface-type specifies the type of the outbound interface.
  • interface-number specifies the number of the outbound interface.

-

verbose

Displays detailed information about MAC address entries.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

The MAC address table of the switch stores MAC addresses of other devices. When forwarding an Ethernet frame, the switch searches the MAC address table for the outbound interface according to the destination MAC address and VLAN ID in the Ethernet frame.

The display mac-address command displays all MAC address entries, such as dynamic MAC address entries, static MAC address entries, and blackhole MAC address entries. A MAC address entry contains the destination MAC address, VLAN ID/VSI/BD, outbound interface, and entry type.

Follow-up Procedure

If any MAC address entry in the command output is incorrect, run the undo mac-address command to delete the entry or run the mac-address static command to add a correct one.

Precautions

If you run the display mac-address command without parameters, all MAC address entries are displayed.

When the switch has a large number of MAC address entries, it is recommended that you specify parameters in the command to filter the output information. Otherwise, the following problems may occur due to excessive output information:
  • The displayed information is repeatedly refreshed, so you cannot find the required information.
  • The system traverses and retrieves information for a long time, and does not respond to any request.

Example

# Display all MAC address entries.

<HUAWEI> display mac-address
------------------------------------------------------------------------------- 
MAC Address          VLAN/VSI/BD                 Learned-From        Type       
-------------------------------------------------------------------------------
0000-0000-0033       100/-/-                     GE0/0/1             dynamic 
0000-0000-0001       200/-/-                     GE0/0/2             static 
-------------------------------------------------------------------------------
Total items displayed = 2 

# Display detailed information about all MAC address entries in VLAN 10.

<HUAWEI> display mac-address vlan 10 verbose
------------------------------------------------------------------------------- 
MAC Address : 0000-0000-0001            VLAN : 10                            
Learned-From: GE0/0/2                 Type : dynamic                       
                                                                                
------------------------------------------------------------------------------- 
Total items displayed = 1
Table 1 Description of the display mac-address command output

Item

Description

MAC Address

Destination MAC address in a MAC address entry.

VLAN/VSI/BD

ID of the VLAN, or name of the VSI, or ID of the BD that a MAC address belongs to.

Learned-From

Interface that learns a MAC address.

Type

Type of a MAC address entry.
  • static: indicates a static MAC address entry, which is manually configured and will not be aged out, configured by using the mac-address static vlan, mac-address static vlanif, mac-address static vsi, mac-address static bridge-domain, or mac-address static bridge-domain vni command.
  • blackhole: indicates a blackhole MAC address entry, which is manually configured and will not be aged out, configured by using the mac-address blackhole command.
  • dynamic: indicates a MAC address entry learned by the switch, which will be aged out when the aging time expires.
  • security: indicates a MAC address entry that an interface learns after port security is enabled.
  • sec-config: indicates a static secure MAC address entry configured by using the port-security mac-address command.
  • sticky: indicates a MAC address entry that an interface learns after the sticky MAC function is enabled.
  • mux: indicates a MAC address entry learned by a MUX VLAN enabled interface.
  • snooping: indicates a static MAC address entry generated based on the dynamic DHCP snooping binding table.
  • authen: indicates a MAC address entry corresponding to the NAC authentication user that obtains an IP address (excluding the Layer 3 authentication user of which the MAC address cannot be generated and wireless user in direct forwarding mode).
  • pre-authen: indicates a MAC address entry corresponding to a user that is in pre-connection state and does not obtain an IP address after NAC authentication is enabled.
  • evpn: indicates a MAC address entry of EVPN.
NOTE:

Among existing MAC address entries, only MAC addresses of the dynamic type can be overwritten as MAC addresses of other types.

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