attacks and save MAC address table space, configure a rule to limit the number of MAC
addresses learned in VLAN 200.
Figure 1-7
Networking diagram for MAC address limiting in a VLAN
Router
Eth2/0/2
Eth2/0/1
IP
network
LSW
LSW
VLAN100
VLAN200
……
Configuration Roadmap
The configuration roadmap is as follows:
1.
Create VLANs on the Router and add the interfaces to the VLANs.
2.
Set the limit on the number of MAC addresses learned in the VLAN 200.
Procedure
Step 1
Configure a MAC address limiting rule in the VLAN 200.
# Add Ethernet2/0/1 to VLAN 100 and VLAN 200; add Ethernet2/0/2 to VLAN 200.
<Huawei>
system-view
[Huawei]
vlan batch 100 200
[Huawei]
interface ethernet 2/0/1
[Huawei-Ethernet2/0/1]
port link-type trunk
[Huawei-Ethernet2/0/1]
port trunk allow-pass vlan 100 200
[Huawei-Ethernet2/0/1]
quit
[Huawei]
interface ethernet 2/0/2
[Huawei-Ethernet2/0/2]
port link-type trunk
[Huawei-Ethernet2/0/2]
port trunk allow-pass vlan 200
[Huawei-Ethernet2/0/2]
quit
# Configure the following MAC address limiting rule in VLAN 200:
l
A maximum of 500 MAC addresses can be learned.
l
When the number of learned MAC address entries reaches the limit, the Router forwards
packets with new source MAC addresses and generates an alarm, but does not add the new
MAC addresses to the MAC address table.
[Huawei]
vlan 200
[Huawei-vlan200]
mac-limit maximum 500 alarm enable
[Huawei-vlan200]
quit
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.
25