Specifications

2-334
Catalyst 4500 Series Switch Cisco IOS Command Reference—Release IOS XE 3.3.0XO(15.1(1)XO)
OL_28738 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
mac address-table learning vlan
mac address-ta ble learning vl an
To enable MAC address l earning on a VLAN, use the m ac address-table learning global configuration
command. Use the no form of this command to disable MAC address learning on a VLAN to control
which VLANs can learn MAC address es.
mac address-table learning vlan vlan-id
no mac address-table learning vlan vlan-id
Syntax Description
Defaults E nabled on all VLANs
Command Modes Global c onfiguratio n
Usage Guidelines W hen you control MAC addr ess learning on a VLAN, you can ma nage the available table spa ce by
controlling which VLANs, and which ports can learn MAC addr esses.
You can disable MAC address learning on a single VLAN ID (for example, by ente ring
no mac address-table learning vlan 223) or on a range of VLAN IDs (for example, by entering
no mac address-table learning vlan 1-20, 15.)
Before you disable MAC a ddress learning , familiarize yourself with t he netwo rk topology and t he swit ch
system configuration. If you disable MAC address learni ng on a VLAN, flooding may occu r in the
network. For example, if you disa ble MAC address learning on a VLAN with a config ured switch virtual
interface (SVI), the switch floods all IP packets in the Laye r 2 domain. If you disable MAC add ress
learning on a VLAN that includes more than two ports, every packet entering the switch is flooded in
that VLAN domain. Disable MAC addres s learning only in VLANs that cont ain two ports. Use caution
before disabling MAC address l earning on a VLAN with an SVI.
You cannot disable MAC addr ess learni ng on a V LAN that t he switch u ses interna lly. This a ction cause s
the switch to generate an error message and rejects the no mac address-table learning vlan c ommand.
To view used internal VLANs, enter the show vlan internal usage privileged EXEC comma nd.
If you disable MAC address learning on a VL AN configur ed as a PVLAN prima ry or a secon dary VLAN,
the MAC addresses are still learned on the VLAN (primary or secondary) associated with the PVLAN.
You cannot disable MAC address learnin g on an RSPAN VLAN. The configuration is not allowed.
If you disable MAC address learn ing on a VLAN that includes a secur e port, MAC address learning is
not disabled on the secure port. If you later disable port security on the interface, the disabled MAC
address learning state is enabled.
To display the MAC address learning stat us of a specific VLAN or for all VLA Ns, enter the
show mac-address-table learning vla n command.
vlan-id Specifies a single VLAN ID or a range of V LAN IDs separated by a hyphen
or comm a. Valid VLAN ID s are 1 t o 4094.