Task
Display MAC address
statistics.
MAC address table configuration example
Network requirements
As shown in
The MAC address of Host A is 000f-e235-dc71 and belongs to VLAN 1. It is connected to
•
GigabitEthernet 4/0/1 of the device. To prevent MAC address spoofing, add a static entry for the
host in the MAC address table of the device.
The MAC address of Host B is 000f-e235-abcd and belongs to VLAN 1. For security, because this
•
host once behaved suspiciously on the network, add a destination blackhole MAC address entry for
the host MAC address, so all packets destined for the host are dropped.
Set the aging timer for dynamic MAC address entries to 500 seconds.
•
Figure 1 Network diagram
Configuration procedure
# Add a static MAC address entry.
<Router> system-view
[Router] mac-address static 000f-e235-dc71 interface GigabitEthernet 4/0/1 vlan 1
# Add a destination blackhole MAC address entry.
[Router] mac-address blackhole 000f-e235-abcd vlan 1
# Set the aging timer for dynamic MAC address entries to 500 seconds.
[Router] mac-address timer aging 500
# Display the MAC address entry for GigabitEthernet 4/0/1.
[Router] display mac-address interface GigabitEthernet 4/0/1
MAC ADDR
Command
display mac-address statistics [ | { begin | exclude |
include } regular-expression ]
Figure
1:
VLAN ID
STATE
PORT INDEX
6
Remarks
Available in any
view.
AGING STATE