< Home

mac-limit

Function

The mac-limit maximum command configures MAC address learning limit rules of an interface.

The undo mac-limit command removes the MAC address learning limit rules configured on an interface.

Format

mac-limit { maximum max | action { discard | forward } } *

undo mac-limit

Parameters

Parameter Description Value
max Specifies the maximum MAC addresses that can be learned on this interface. The value is an integer ranging from 0 to 4096. If the value is 0, the number of MAC addresses that can be learned on this interface is not limited.
discard Indicates that the packets whose MAC address cannot be learnt are discarded when the MAC address learning limit is reached. -
forward Indicates that the packets whose MAC address cannot be learnt are forwarded when the MAC address learning limit is reached. -

Views

Layer 2 Ethernet interface view

Default Level

2: Configuration level

Usage Guidelines

If there are learned MAC addresses on a port or VLAN, run the undo mac-address dynamic command to clear the learned addresses. Otherwise, the number of MAC addresses to be learned cannot be accurately controlled.

Example

# Configure the maximum number of MAC addresses to be learned to 100 on GigabitEthernet 0/0/1.

<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] mac-limit maximum 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >