mac-limit rule-name

Function

The mac-limit rule-name command applies a global MAC address learning limit rule on an interface.

The undo mac-limit rule-name command deletes a global MAC address learning limit rule applied on an interface.

By default, no global MAC address learning limit rule is applied on an interface.

Format

mac-limit rule-name rule-name

Parameters

Parameter Description Value
rule-name

Specifies the name of a global MAC address learning limit rule.

The value is a string of 1 to 31 characters. It does not support space, question mark, or subtraction sign.

Views

Layer 2 100GE interface view, Layer 2 10GE interface view, 25GE-L2 view, 400GE-L2 view, Layer 2 40GE interface view, Layer 2 50GE interface view, Eth-Trunk interface view, Layer 2 GE interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
mac write

Usage Guidelines

Usage Scenario

To control the number of users and protect a MAC address table against attacks, you can limit the number of MAC addresses that a device can learn. You can also configure the system to discard packets or generate an alarm to improve network security.

To apply a global MAC address learning limit rule on an interface, run the mac-limit rule-name command in the interface view.

Prerequisites

The specified global MAC address learning limit rule must have been configured using the mac-limit rule-name (system view) command.

Configuration Impact

If a global MAC address learning limit rule has been applied on an interface, another MAC address learning rule cannot be configured on the interface using the mac-limit command.

Precautions

GE interface, and Eth-Trunk interface must be Layer 2 interfaces.

Example

# Apply the global MAC address learning limit rule named name1 on GE 0/1/9.
<HUAWEI> system-view
[~HUAWEI] mac-limit rule-name name1 maximum 10000 rate 100 alarm enable
[*HUAWEI] interface GigabitEthernet0/1/9
[*HUAWEI-GigabitEthernet0/1/9] portswitch
[*HUAWEI-GigabitEthernet0/1/9] mac-limit rule-name name1
Copyright ? Huawei Technologies Co., Ltd.
Copyright ? Huawei Technologies Co., Ltd.
< Previous topic Next topic >