display mac-address static [ vsi vsi-name ] [ verbose ]
display mac-address static [ vlan vlan-id | interface-type interface-number ] * [ verbose ]
Parameter |
Description |
Value |
---|---|---|
vlan vlan-id |
Displays static MAC address entries in a specified VLAN. |
The value is an integer that ranges from 1 to 4094. |
vsi vsi-name |
Displays static MAC address entries in a specified VSI. vsi-name specifies the name of a 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 static MAC address entries on a specified interface. |
- |
verbose |
Displays detailed information about static MAC address entries. |
- |
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.
To improve network security, configure static MAC address entries to ensure that packets destined for specified MAC addresses are forwarded by the specified interfaces. This prevents attack packets with bogus MAC addresses and guarantees communication between the switch and the upstream device or server. After configuring static MAC address entries, you can run the display mac-address static command to verify the configuration.
Follow-up Procedure
If any static MAC address entry is incorrect, run the undo mac-address command to delete it.
Precautions
If you run the display mac-address static command without parameters, all static MAC address entries are displayed.
If the MAC address table does not contain any static MAC address entry, no information is displayed.
# Display all static MAC address entries.
<HUAWEI> display mac-address static ------------------------------------------------------------------------------- MAC Address VLAN/VSI/BD Learned-From Type ------------------------------------------------------------------------------- 0000-0000-0033 100/-/- GE0/0/1 static 0000-0000-0001 200/-/- GE0/0/2 static ------------------------------------------------------------------------------- Total items displayed = 2
# Display detailed information about all static MAC address entries in VLAN 10.
<HUAWEI> display mac-address static vlan 10 verbose ------------------------------------------------------------------------------- MAC Address : 0000-0000-0001 VLAN : 10 Learned-From: GE0/0/1 Type : static ------------------------------------------------------------------------------- Total items displayed = 1
Item |
Description |
---|---|
MAC Address |
Destination MAC address in a static 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. |