mac-address mac-learning disable

Syntax

mac-address mac-learning disable

undo mac-address mac-learning disable

View

Layer 2 Ethernet interface view, VLAN view (available only on the HPE 3100 v2 EI), port group view, Layer 2 aggregate interface view

Default level

2: System level

Parameters

None

Description

Use mac-address mac-learning disable to disable MAC address learning. Depending on the view that you entered, you can disable it on a Layer 2 interface or a group of Ethernet ports, or on a VLAN.

Use undo mac-address mac-learning disable to enable MAC address learning. Depending on the view that you entered, you can disable it on a Layer 2 interface or a group of Ethernet ports, or on a VLAN.

By default, MAC address learning is enabled.

Follow these guidelines when you configure MAC address learning:

Related commands: display mac-address mac-learning.


[NOTE: ]

NOTE:

When MAC address learning is disabled, the learned MAC addresses remain valid until they age out.


Examples

# Disable MAC address learning on port Ethernet 1/0/1.

<Sysname> system-view
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] mac-address mac-learning disable

# Disable MAC address learning on VLAN 10. (Available only on the HPE 3100 v2 EI switch)

<Sysname> system-view
[Sysname] vlan 10
[Sysname-vlan10] mac-address mac-learning disable

# Disable MAC address learning on Bridge-Aggregation 1.

<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] mac-address mac-learning disable