Step 2
Set the aging time for the dynamic MAC address entries.
[Router]
mac-address aging-time 500
Step 3
Verify the configuration.
# Run the
display mac-address
command in any view to check whether the static MAC address
entries are successfully added to the MAC address table.
[Router]
display mac-address static vlan 2
-------------------------------------------------------------------------------
MAC Address VLAN/Bridge Learned-From Type
-------------------------------------------------------------------------------
0002-0002-0002 2/- Eth2/0/1 static
0003-0003-0003 2/- Eth2/0/1 static
0004-0004-0004 2/- Eth2/0/2 static
-------------------------------------------------------------------------------
Total items displayed = 3
# Run the
display mac-address aging-time
command to check whether the aging time for
dynamic entries is set successfully.
[Router]
display mac-address aging-time
Aging time: 500 seconds
----End
Configuration Files
Configuration file of the Router
#
vlan batch 2
#
mac-address aging-time 500
#
interface Ethernet2/0/1
port hybrid tagged vlan 2
#
interface Ethernet2/0/2
port hybrid pvid vlan 2
port hybrid untagged vlan 2
#
mac-address static 0002-0002-0002 Ethernet2/0/1 vlan 2
mac-address static 0003-0003-0003 Ethernet2/0/1 vlan 2
mac-address static 0004-0004-0004 Ethernet2/0/2 vlan 2
#
return
1.7.2 Example for Configuring Port Security
Networking Requirements
As shown in
, a company wants to prevent non-employees from accessing the intranet.
To achieve this information security goal, the company needs to enable the port security function
on the router interface connected to computers of employees and set the maximum number of
MAC addresses learned on the interface to the total number of trusted computers.
Huawei AR530&AR550 Series Industrial Switch Routers
Configuration Guide - Ethernet Switching
1 MAC Address Table Configuration
Issue 01 (2014-11-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
21