mac limit

Function

The mac limit command sets a MAC address limit for an EVPN instance.

The undo mac limit command restores the default configuration.

By default, no MAC address limit is set for an EVPN instance.

Format

mac limit number [ mac-unchanged | simply-alert ]

undo mac limit

Parameters

Parameter Description Value
number

Sets the maximum number of MAC addresses allowable for an EVPN instance.

The value is an integer ranging from 1 to 131072.

mac-unchanged

Allows the existing numbers of MAC address entries and MAC routes to persist even if the number of MAC addresses being processed by an EVPN instance exceeds the threshold. In this case, an alarm is generated, and no new MAC addresses can be processed. Threshold crossing occurs if the initially configured MAC address limit or the number value is reduced.

-

simply-alert

Allows an EVPN instance to continue to process MAC addresses even if the number of MAC addresses being processed exceeds the number value. In this case, only an alarm is generated.

-

Views

BD EVPN view, EVPN instance view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
vstm write

Usage Guidelines

Usage Scenario

If a device imports a large number of MAC addresses, which consumes a lot of system resources, device operation may be affected when the system processes many services concurrently. To improve system security and reliability, run the mac limit command to limit the number of MAC addresses being processed by an EVPN instance. After this configuration is performed, the device checks the number of MAC routes generated based on the local MAC address information and the number of MAC address entries generated after the device receives remote MAC routes. If the sum of the two numbers exceeds the value, an alarm is generated, prompting you to check the validity of the MAC addresses in the system.

Configuration Impact

After the mac limit command is run on a device, the device may discard some MAC addresses.

Precautions

If the mac limit command is run repeatedly, the latest configuration overwrites the previous one.

The mac limit command is run in the EVPN view to limit the number of MAC addresses in an EVPN instance. The MAC addresses include those sent locally and those flooded from EVPN peers.

Example

# Set a MAC address limit for an EVPN instance and allow only an alarm to be generated if the number of MAC addresses being processed exceeds the limit.
<HUAWEI> system-view
[~HUAWEI] evpn vpn-instance evpn1
[*HUAWEI-evpn-instance-evpn1] mac limit 1000 simply-alert
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >