• It is recommended that you disable MAC address learning only in VLANs with two ports. If you disable
MAC address learning on a VLAN with more than two ports, every packet entering the switch is flooded
in that VLAN domain.
• If you disable MAC address learning on a VLAN that includes a secure port, MAC address learning is
not disabled on that port.
Procedure
PurposeCommand or Action
Enters the global configuration mode.configure terminal
Example:
Step 1
Device# configure terminal
Disable MAC address learning on a specified
VLAN or VLANs.
no mac-address-table learning vlan[vlan-id
|,vlan-id | -vlan-id,]
Step 2
Example:
You can specify a single VLAN ID or a range
of VLAN IDs separated by a hyphen or comma.
Device(config)# no mac-address-table
learning {vlan vlan-id [,vlan-id |
-vlan-id]
Valid VLAN IDs range from 2 - 4093. It cannot
be an internal VLAN.
Returns to privileged EXEC mode.end
Example:
Step 3
Device(config)# end
Verify the configuration.show mac-address-tablelearning vlan[vlan-id
]
Step 4
You can display the MAC address learning
status of all VLANs or a specified VLAN by
Example:
entering the show mac-address-table learning
[vlan vlan-id] privileged EXEC command.
Device# show mac-address-table learning
[vlan vlan-id]
(Optional) Save your entries in the configuration
file.
copy running-config startup-config
Example:
Step 5
Device# copy running-config
startup-config
(Optional) Reenable MAC address learning on
VLAN in a global configuration mode.
default mac address-table learning
Example:
Step 6
Device# default mac address-table
Adding and Removing Static Address Entries
Follow these steps to add a static address:
System Management Configuration Guide, Cisco IOS XE Bengaluru 17.4.x (Catalyst 9400 Switches)
34
Administering the Device
Adding and Removing Static Address Entries