30-10
Software Configuration Guide—Release 12.2(25)EWA
OL-6850-03
Chapter30 Configuring Port Security and Trunk Port Security
Configuring Port Security
To configure port security aging, perform this task:
To disable port security aging for all secure addresses on a port, use the
no switchport port-security aging time interface configuration command.
This example shows how to set the aging time as 2 hours for the secure addresses on the Fast Ethernet
interface 5/1:
Switch(config)# interface fastethernet 5/1
Switch(config-if)# switchport port-security aging time 120
This example shows how to set the aging time as 2 minutes:
Switch(config-if)# switchport port-security aging time 2
You can verify the previous commands by entering the show port-security interface interface_id
command.
Command Purpose
Step1 Switch(config)# interface
interface_id
Enters interface configuration mode for the port on which
you want to enable port security aging.
Step2 Switch(config-if)# switchport port-security
[aging {static | time
aging_time
| type {absolute
| inactivity}]
Sets the aging time for the secure port.
The static keyword enables aging for statically
configured secure addresses on this port.
The time aging_time keyword specifies the aging time for
this port. Valid range for aging_time is from 0 to 1440
minutes. If the time is equal to 0, aging is disabled for this
port.
The type keyword sets the aging type as absolute or
inactive. For absolute aging, all the secure addresses on
this port ago out exactly after the time (minutes) sp ecified
and are removed from the secure address list. For inactive
aging, the secure addresses on this port ago out only if
there is no data traffic from the secure source address for
the specified time period.
Step3 Switch(config-if)# end Returns to privileged EXEC mode.
Step4 Switch# show port security [interface
interface_id
] [address]
Verifies your entries.