Configuration Roadmap
The configuration roadmap is as follows:
1. Set the limit on the number of MAC addresses learned by the interfaces.
2. Set the action performed when the limit is reached.
Procedure
Step 1 Configure MAC address limiting rules on the interfaces.
<Huawei> system-view
[Huawei] interface ethernet 2/0/1
[Huawei-Ethernet2/0/1] mac-limit maximum 4 action discard alarm enable
[Huawei-Ethernet2/0/1] quit
[Huawei] interface ethernet 2/0/2
[Huawei-Ethernet2/0/2] mac-limit maximum 100 action discard alarm enable
[Huawei-Ethernet2/0/2] quit
Step 2 Verify the configuration.
# Run the display mac-limit command in any view to check whether the MAC address limiting
rule is successfully configured.
<Huawei> display mac-limit
-----------------------------------------------------------------------
PORT VLAN Maximum Action Alarm
-----------------------------------------------------------------------
Eth2/0/1 - 4 discard enable
Eth2/0/2 - 100 discard enable
-----------------------------------------------------------------------
----End
Configuration Files
Configuration file of the Router
#
interface Ethernet2/0/1
mac-limit maximum 4
#
interface Ethernet2/0/2
mac-limit maximum 100
#
return
1.7.4 Example for Configuring a MAC Address Learning Rule in a
VLAN
Networking Requirements
As shown in Figure 1-7, Ethernet2/0/1 and Ethernet2/0/2 of the Router are connected to LSWs.
The LSWs are connected to users, including a few IP phone users and many computer users. IP
phone users are in VLAN 100, and computer users are in VLAN 200. To prevent MAC address
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.
24