Configuring a MAC address learning limit rule can control the number of access users. If the number of learned MAC addresses reaches the maximum number, no additional MAC addresses will be learned. In addition, the packet discarding and alarm functions can be configured to prevent MAC address attacks and improve network security.
Before configuring a MAC address learning limit rule, run the reset mac-address command to clear the learned MAC addresses to ensure that the number of MAC addresses that can be learned is limited accurately.
The system view is displayed.
Configure a MAC address learning limit rule on an interface to control the number of users connected to the interface. Choose one of the following configuration modes:
Configuring a MAC Address Learning Limit Rule |
Operation |
---|---|
Specifying a rule name |
|
Without specifying a rule name |
|
Configure a MAC address learning limit rule in a VLAN to control the number of users in the VLAN.
Run vlan vlan-id
The VLAN view is displayed.
Run mac-limit { action { discard | forward } | alarm { disable | enable }| maximum maxValue [ rate interval ] } *
The MAC address learning limit rule is configured.
(Optional) Run mac-limit up-threshold up-threshold down-threshold down-threshold
The threshold percentage of MAC addresses that have alarms generated and cleared is configured.
Configure a MAC address learning limit rule on an interface in a VLAN to control the number of VLAN users connected to the interface. Choose one of the following configuration modes:
Configuring a MAC Address Learning Limit Rule |
Operation |
---|---|
Specifying a rule name |
|
Without specifying a rule name |
Configure a MAC address learning limit rule in a virtual switching instance (VSI) to control the number of users in the VSI.
Run vsi vsi-name [ static ]
The VSI view is displayed.
Run mac-limit { action { discard | forward } | maximum max [ rate interval ] } *
The MAC address learning limit rule is configured.
Run mac-limit up-threshold up-threshold down-threshold down-threshold
Alarm rising and falling thresholds are configured for MAC address learning.
Configure a MAC address learning limit rule on a pseudo wire (PW) to control the number of users on the PW.
Run vsi vsi-name [ static ]
The VSI view is displayed.
The VSI LDP view is displayed.
The VSI ID is configured.
The IP address of a VSI peer is configured.
A PW is created.
Run mac-limit { action { discard | forward } | alarm { disable | enable } | maximum Value [ rate interval ] } *
A MAC address learning limit rule is configured.
The configuration is committed.