mac-learn-disable

Disables a physical port from automatic learning the source MAC address.
Syntax
mac-learn-disable
no mac-learn-disable
Command Default

By default, when a packet with an unknown source MAC address is received on a port, the device learns this MAC address on the port.

Modes

Interface configuration mode

Usage Guidelines

This command is not available on virtual routing interfaces. Also, if this command is configured on the LAG virtual interface, MAC address learning (source MAC address) will be disabled on all the ports in the LAG.

Entering the command on a tagged ports disables source MAC address learning for that port in all VLANs of which that port is a member. For example, if tagged port 1/1/1 is a member of VLAN 10, 20, and 30 and you issue the mac-learn-disable command on port 1/1/1, port 1/1/1 will not learn source MAC addresses, even if it is a member of VLAN 10, 20, and 30.

The no form of the command allows a physical port to learn source MAC addresses.

Examples

The following example disables the automatic learning of the source MAC address.

device(config)# interface ethernet 1/1/1
device(config-if-e1000-1/1/1)# mac-learn-disable