18-11
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 18 Configuring Port -Based Traffic Control Configuring Port Security
Beginning in privileged EXEC mode, follow these steps to configure port security aging:
To disable por t securit y aging for all sec ure addr esses on a port , use the no switchport port-security
aging tim e interface configuration command. To disable aging for only statically configured secure
addresses, use the no switchport port-security aging static interface configuration command.
This exampl e shows how to set the agi ng time as 2 hours fo r the sec ure addr esses on the Fast Ethe rnet
interface 0/1:
Switch(config)# interface fastethernet0/1
Switch(config-if)# switchport port-security aging time 120
This example shows how to set the aging time as 2 minutes for the inactivity aging type with aging
enab led fo r th e configur ed sec ure a dd resses on t he i n terfa ce:
Switch(config-if)# switchport port-security aging time 2
Switch(config-if)# switchport port-security aging type inactivity
Switch(config-if)# switchport port-security aging static
You can verify the previous command s by entering t he show port- sec uri ty i nte rfac e interface-id
privileged EXEC command.
Command Purpose
Step 1 configure terminal Enter gl obal configura tion mode.
Step 2 interface interface-id Spec ify the por t on w hich yo u want t o en able p ort se curi ty ag in g, a nd ent e r
interface configuration mode.
Step 3 switchport port-security aging
{static | time time | type {absolute |
inactivity}}
Enable or disable static aging for the secure port, or set the aging time or
type.
Enter static to enable aging for statically configured secure addresses on this
port.
For time, specify the aging time for this port. The valid range is from 0 to 1440
minutes. If the time is equal to 0, aging is disabled for this port.
For type, select one of the se keywords:
absoluteSets the aging type as absolute aging. All the secure addresses
on this port age out exactly after the time (minutes) specified lapses and are
removed from the secure address list.
inactivitySets the aging type as inactivity aging. The secure addresses on
this port age out only if there is no data traffic from the secure source
addresses for the specified time period.
Step 4 end Return to privileged EXEC mode.
Step 5 show port-security [interface
interface-id] [address]Verify yo ur en trie s.
Step 6 copy running-config startup-config (Opti onal) Save your entries i n the configurat ion file.