< Home

display mac-address security

Function

The display mac-address security command displays secure dynamic MAC address entries.

Format

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

Parameters

Parameter

Description

Value

vlan vlan-id

Displays secure dynamic MAC address entries in a specified VLAN.

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

interface-type interface-number

Displays secure dynamic 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 secure dynamic MAC address entries.

-

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

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 device restarts.

After configuring the port security function, you can run the display mac-address security command to check whether the learned secure dynamic MAC address entries are correct.

Follow-up Procedure

If the displayed secure dynamic MAC address entries are invalid, run the undo mac-address security command to delete secure dynamic MUX MAC address entries.

Precautions

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

If the MAC address table does not contain any secure dynamic MAC address entry, no information is displayed.

When the device has a large number of secure dynamic 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 secure dynamic MAC address entries.

<HUAWEI> display mac-address security
------------------------------------------------------------------------------- 
MAC Address    VLAN/VSI/BD                       Learned-From        Type       
-------------------------------------------------------------------------------
0022-0022-0033 100/-/-                           GE0/0/1             security 
0000-0000-0001 200/-/-                           GE0/0/2             security 

-------------------------------------------------------------------------------
Total items displayed = 2 

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

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

Item

Description

MAC Address

Destination MAC address in a secure dynamic 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 security, which indicates a secure dynamic MAC address.

Aging-Time

How soon a secure dynamic MAC address entry will be aged out.

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