1
MAC address table configuration
commands
The MAC address table can contain only Layer 2 Ethernet ports.
This document covers only the static, dynamic, and destination blackhole MAC address entries.
display mac-address
Use
display mac
-
address
to display information about the MAC address table.
Syntax
display mac-address
[
mac
-
address
[
vlan
vlan-id
] | [ [
dynamic
|
static
] [
interface interface-type
interface-number
] |
blackhole
] [
vlan
vlan-id
] [
count
] ] [
|
{
begin
|
exclude
|
include
}
regular-expression
]
Views
Any view
Default command level
1: Monitor level
Parameters
blackhole
: Displays destination blackhole MAC address entries.
vlan vlan
-
id
: Specifies a VLAN by its ID in the range of 1 to 4094.
count
: Displays the number of MAC address entries specified by related parameters in the
command. When this keyword is used, the command displays only the number of specified MAC
address entries, rather than related information about these MAC address entries.
mac
-
address
: Displays MAC address entries of a specified MAC address, in the format of H-H-H.
dynamic
: Displays dynamic MAC address entries, which can be aged.
static
: Displays static MAC address entries, which do not age.
interface interface
-
type interface
-
number
: Displays the MAC address learning status of the
specified interface.
interface
-
type interface
-
number
specifies an interface by its type and number.
|
: Filters command output by specifying a regular expression. For more information about regular
expressions, see
Fundamentals Configuration Guide
.
begin
: Displays the first line that matches the specified regular expression and all lines that follow.
exclude
: Displays all lines that do not match the specified regular expression.
include
: Displays all lines that match the specified regular expression.
regular-expression
: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display the MAC address entry for MAC address 000f-e201-0101.
<Sysname> display mac-address 000f-e201-0101
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)
000f-e201-0101 1 Learned Ethernet1/1 AGING
--- 1 mac address(es) found ---