38-6
Catalyst 6500 Series Switch Software Configuration Guide—Release 8.7
OL-8978-04
Chapter 38 Configuring Port Security
Configuring Port Security on the Switch
In software releases 8. 1 and 8.2, you can configure a single MAC address on the access ports that are
located on different VLANs but you cannot configure port security on them. In software release 8.3(1)
and later releases, which support port security on the trunk ports, a single MAC address can be configured
and secured on multiple ports that are in different VLANs. For example, a MAC address "00-00-aa-00-00-aa"
can be configured or secured on port 2/1 in VLAN 10 and 2/2 in VLAN 20. If both these ports were in VLAN
10, this MAC address could be configured or secured on only one of these ports. A MAC address can be
configured or secured on only one of the ports belonging to a VLAN.
To set the number of MAC addresses to be secured for a particular port, perform this task in privileged
mode:
This example shows how to set the number of MAC addresses to be secured:
Console> (enable)
set port security 7/7 maximum 20
Maximum number of secure addresses set to 20 for port 7/7.
Console> (enable)
This example shows how to reduce the number of MAC addresses and the list that displays the cleared
MAC addresses:
Console> (enable)
set port security 7/7 maximum 18
Maximum number of secure addresses set to 18 for port 7/7
00-11-22-33-44-55 cleared from secure address list for port 7/7
00-11-22-33-44-66 cleared from secure address list for port 7/7
Console> (enable)
Automatically Configuring Dynamically Learned MAC Addresses
The automatic configuration of dynamically learned MAC addresses enables dynamically learned MAC
addresses to be associated with particular ports. This feature applies globally to all secure ports on the
system.
The dynamically learned addresses are treated like manually configured addresses and the configuration
is stored in NVRAM. The addresses are retained in the event that a secure port is shut down due to a
security violation, port security is disabled, or a secure port is administratively disabled.
Note
The dynamically learned addresses that have been configured using the automatic configuration option
are not cleared under any circumstances. These addresses must be cleared manually by entering the
clear
port security
command.
To enable the automatic configuration of dynamically learned MAC addresses, perform this task in
privileged mode:
Task
Command
Set the number of MAC addresses to be
secured on a port.
set port security
mod/port
maximum
num_of_mac
Task
Command
Enable automatic configuration of
dynamically learned MAC addresses.
set port security auto-configure enable | disable