Parameter |
Description |
Value |
---|---|---|
vlan vlan-id |
Displays sticky MAC address entries in a specified VLAN. |
The value is an integer that ranges from 1 to 4094. |
interface-type interface-number |
Displays sticky MAC address entries with a specified outbound
interface.
|
- |
verbose |
Displays detailed information about sticky 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.
After port security is enabled on an interface by using the port-security enable command, MAC address entries learned by the interface are stored in the MAC address table as secure dynamic MAC address entries. The learned secure dynamic MAC address entries are deleted after the switch restarts. If the sticky MAC function is also enabled on the interface by using the port-security mac-address sticky command, secure dynamic MAC address entries change to sticky MAC address entries. Sticky MAC address entries are not deleted after the switch restarts.
To check the sticky MAC configuration or the learned sticky MAC address entries, run the display mac-address sticky command.
Follow-up Procedure
If the displayed sticky MAC address entries are invalid, run the undo mac-address sticky command to delete sticky MAC address entries.
Precautions
If you run the display mac-address sticky command without parameters, all sticky MAC address entries are displayed.
If the MAC address table does not contain any sticky MAC address, no information is displayed.
# Display all sticky MAC address entries.
<HUAWEI> display mac-address sticky ------------------------------------------------------------------------------- MAC Address VLAN/VSI/BD Learned-From Type ------------------------------------------------------------------------------- 0022-0022-0033 100/-/- GE0/0/1 sticky 0000-0000-0001 200/-/- GE0/0/2 sticky ------------------------------------------------------------------------------- Total items displayed = 2
# Display detailed information about all sticky MAC address entries in VLAN 10.
<HUAWEI> display mac-address sticky vlan 10 verbose ------------------------------------------------------------------------------- MAC Address : 0000-0000-0001 VLAN : 10 Learned-From: GE0/0/1 Type : sticky ------------------------------------------------------------------------------- Total items displayed = 1
Item |
Description |
---|---|
MAC Address |
MAC address in a sticky MAC address entry. |
VLAN/VSI/BD |
ID of the VLAN, name of the VSI, or the 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. The value is sticky, which indicates a sticky MAC address. |