Configuring Port Security
SUMMARY STEPS
1. configure terminal
2. Enter one of the following commands:
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
Command or Action
Step 1
configure terminal
Example:
switch# configure terminal
switch(config)#
Step 2
Enter one of the following commands:
• interface ethernet slot/port
• interface port-channel channel-number
Example:
switch(config)# interface ethernet 2/1
switch(config-if)#
Step 3
[no] switchport port-security aging type {absolute |
inactivity}
Example:
switch(config-if)# switchport port-security aging
type inactivity
Step 4
[no] switchport port-security aging time minutes
Example:
switch(config-if)# switchport port-security aging
time 120
Step 5
(Optional) show running-config port-security
Example:
switch(config-if)# show running-config
port-security
• interface ethernet slot/port
• interface port-channel channel-number
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
Configuring an Address Aging Type and Time
Purpose
Enters global configuration mode.
Enters interface configuration mode for the interface that
you want to configure with the MAC aging type and time.
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.
Configures the number of minutes that a dynamically
learned MAC address must age before the device drops the
address. The maximum valid minutes is 1440. The no
option resets the aging time to the default, which is 0
minutes (no aging).
Note
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.
Displays the port security configuration.
321