Figure 1-5
Network diagram of port security configuration
Router
Switch
Internet
PC1
PC2
PC3
VLAN 10
Eth2/0/1
Configuration Roadmap
The configuration roadmap is as follows:
1.
Create a VLAN and set the link type of the interface to trunk.
2.
Enable the port security function.
3.
Enable the sticky MAC function on the interface.
4.
Configure the protective action on the interface.
5.
Set the maximum number of MAC addresses that can be learned on the interface.
Procedure
Step 1
Create a VLAN and set the link type of the interface to trunk.
<Huawei>
system-view
[Huawei]
sysname Huawei
[Router]
vlan 10
[Router-vlan10]
quit
[Router]
interface ethernet 2/0/1
[Router-Ethernet2/0/1]
port link-type trunk
[Router-Ethernet2/0/1]
port trunk allow-pass vlan 10
Step 2
Configure the port security function.
# Enable the port security function.
[Router-Ethernet2/0/1]
port-security enable
Enable the sticky MAC function.
[Router-Ethernet2/0/1]
port-security mac-address sticky
# Configure the protective action.
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.
22