
16-5
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2948G-GE-TX, and Catalyst 2980G Switches Software Configuration Guide—Release 8.2GLX
78-15908-01
Chapter 16 Configuring Port Security
Configuring Port Security on the Switch
This example shows how to set the number of MAC addresses to be secured:
Console> (enable) set port security 4/7 maximum 20
Maximum number of secure addresses set to 20 for port 4/7.
Console> (enable)
This example shows how to reduce the number of MAC addresses; it also shows how to display the list
of cleared MAC addresses:
Console> (enable) set port security 4/7 maximum 18
Maximum number of secure addresses set to 18 for port 4/7
00-11-22-33-44-55 cleared from secure address list for port 4/7
00-11-22-33-44-66 cleared from secure address list for port 4/7
Console> (enable)
Setting the Port Security Age Time
The age time on a port specifies how long all addresses on that port will be secured. This age time is
activated when a MAC address initiates traffic on the port. After the age time expires for a MAC address,
the entry for that MAC address on the port is removed from the secure address list. The valid range is
from 1–1440 minutes. Setting the age time to zero disables aging of secure addresses.
To set the age time on a port, perform this task in privileged mode:
Console> (enable) set port security 4/7 age 600
Secure address age time set to 600 minutes for port 4/7.
Console> (enable)
Clearing MAC Addresses
Enter the clear port security command to clear MAC addresses from a list of secure addresses on a port.
Note
If you enter the clear command on a MAC address that is in use, the network may relearn that MAC
address and make the MAC address secure again. We recommend that you disable port security before
you clear the MAC addresses.
To clear all of the MAC addresses or one particular address from the list of secure MAC addresses,
perform this task in privileged mode:
Task
Command
Set the age time for which addresses on a port will
be secured.
set port security mod_num/port_num age time
Task
Command
Clear all of the MAC addresses or one particular
address from the list of secure MAC addresses.
clear port security mod_num/port_num
{mac_addr | all}