SUMMARY STEPS
1.
configure terminal
2.
Enter one of the following commands:
•
interface ethernet slot
/
port
•
interface port-channel channel-number
3.
[
no
]
switchport port-security aging type
{
absolute
|
inactivity
}
4.
[
no
]
switchport port-security aging time minutes
5.
(Optional)
show running-config port-security
6.
(Optional)
copy running-config startup-config
DETAILED STEPS
Purpose
Command or Action
Enters global configuration mode.
configure terminal
Example:
Step 1
switch# configure terminal
switch(config)#
Enters interface configuration mode for the interface that
you want to configure with the MAC aging type and time.
Enter one of the following commands:
Step 2
•
interface ethernet slot
/
port
•
interface port-channel channel-number
Example:
switch(config)# interface ethernet 2/1
switch(config-if)#
Configures the type of aging that the device applies to
dynamically learned MAC addresses. The
no
option resets
the aging type to the default, which is absolute aging.
[
no
]
switchport port-security aging type
{
absolute
|
inactivity
}
Example:
Step 3
switch(config-if)# switchport port-security aging
type inactivity
Configures the number of minutes that a dynamically
learned MAC address must age before the device drops the
[
no
]
switchport port-security aging time minutes
Example:
Step 4
address. The maximum valid
minutes
is 1440. The
no
switch(config-if)# switchport port-security aging
time 120
option resets the aging time to the default, which is 0
minutes (no aging).
For Cisco Nexus 9200 and 9300-EX Series
switches, up to 2 minutes might be added to the
configured aging time. For example, if you set
the aging time to 10 minutes, the age out occurs
between 10 and 12 minutes after traffic stops.
Note
Displays the port security configuration.
(Optional)
show running-config port-security
Example:
Step 5
switch(config-if)# show running-config
port-security
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
321
Configuring Port Security
Configuring an Address Aging Type and Time