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.
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 ] * ]
| 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. |
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.
The display mac-address command can be run to check all MAC address entries in the system.
Precautions
# 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
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:
|