4-30
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 4 Administering the Switch
Managing the MAC Address Table
Disabling MAC Address Learning on a VLAN
By default, MAC address learning is enabled on all VLANs on the switch. By controlling which VLANs
can learn MAC addresses, you can manage the available MAC address table space. By disabling learning
on a VLAN, you can conserve the MAC address table space because all the MAC addresses seen on this
VLAN are not learned.
Before disabling MAC address learning, you should understand the network topology and features
deployed. Many Layer 2 features use MAC addresses and may not work properly if learning is disabled.
Because disabling learning causes flooding of packets, you need to understand the impact of flooding on
the network.
These sections contain this information:
Deployment Scenarios, page 4-31
Configuring Disable MAC Address Learning, page 4-30
Usage Guidelines, page 4-31
Deployment Scenarios, page 4-31
Feature Compatibility, page 4-33
Feature Incompatibility, page 4-34

Configuring Disable MAC Address Learning

To disable MAC address learning on a VLAN, perform this task:
This example shows how to disable learning on any VLAN or range of VLANs:
Switch# configure terminal
Switch(config)# no mac address-table learning vlan 9-16
Switch(config)# end
Switch#
Switch# show mac address-table learning
Learning disabled on vlans: 9-11,13-16
Switch# show mac address-table learning vlan 10-15
Learning disabled on vlans: 10-11,13-15
Command Purpose
Step 1 Switch# configure terminal Enters global configuration mode.
Step 2 Switch(config)# no mac
address-table learning vlan vlan-id
range
Disables MAC address learning on the specified VLAN or VLANs. You
can specify a single VLAN ID or a range of VLAN IDs separated by a
hyphen or comma. Valid VLAN IDs are 1 to 4094.
You can reenable MAC address learning on a VLAN by entering the
mac address-table learning vlan global configuration command.
Step 3 Switch(config)# end Returns to privileged EXEC mode.
Step 4 Switch# show mac address-table
learning [vlan vlan-id range]Displays the MAC address learning status of all VLANs or a specified
VLAN.
Step 5 Switch# copy running-config
startup-config (Optional) Saves your entries in the configuration file.