< Home

display mac-address sticky

Function

The display mac-address sticky command displays sticky VLAN MAC address entries.

Format

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

Parameters

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.
  • interface-type specifies the type of the outbound interface.
  • interface-number specifies the number of the outbound interface.

-

verbose

Displays detailed information about sticky 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.

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.

When the switch has a large number of sticky 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 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
Table 1 Description of the display mac-address sticky command output

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.

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