< Home

mac-address learning disable (traffic behavior view)

Function

The mac-address learning disable command disables MAC address learning in a traffic behavior.

The undo mac-address learning disable command enables MAC address learning in a traffic behavior.

By default, MAC address learning is enabled in a traffic behavior.

Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, S5735S-S, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support this command.

Format

mac-address learning disable

undo mac-address learning disable

Parameters

None

Views

Traffic behavior view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The mac-address learning disable command is used in the following scenarios:

  • When a network is running stably and the MAC address of packets is fixed, a device does not need to learn MAC addresses of other packets. To save MAC addresses and improve device efficiency, apply a traffic policy and disable MAC address learning in all the traffic classifiers bound to the traffic policy.
  • Some unauthorized users may change MAC addresses frequently to attack the network. To prevent MAC address overflow and protect device performance, apply a traffic policy and disable MAC address learning in all the traffic classifiers bound to the traffic policy.

Follow-up Procedure

Run the traffic policy command to create a traffic policy and run the classifier behavior command in the traffic policy view to bind the traffic classifier to the traffic behavior containing the action of disabling MAC address learning.

Precautions

After the traffic behavior containing mac-address learning disable is bound to the specified traffic classifier, the source MAC addresses of packets matching the traffic classifier are not learned. The source MAC addresses of packets that do not match the traffic classifier are still learned by default.

The mac-address learning disable command is similar to the mac-address learning disable command in the interface view or VLAN view. The difference is that the mac-address learning disable command is valid for the packets matching the user-defined traffic classifier and is applied to the system, an interface, or a VLAN by using the traffic policy. The mac-address learning disable command is used in the interface view, port group view, or VLAN view and is valid for all the packets in the corresponding view.

To disable MAC address learning on an interface, in a port group, or in a VLAN, run the mac-address learning disable command in the corresponding view. To disable MAC address learning for a specified traffic classifier, run the mac-address learning disable command in the traffic behavior view.

Example

# Disable MAC address learning in the traffic behavior test.

<HUAWEI> system-view
[HUAWEI] traffic behavior test
[HUAWEI-behavior-test] mac-address learning disable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >