Purpose
Command or Action
switch# configure terminal
switch(config)#
Enables port security globally. The
no
option disables port
security globally.
[
no
]
feature port-security
Example:
Step 2
switch(config)# feature port-security
Displays the status of port security.
(Optional)
show port-security
Example:
Step 3
switch(config)# show port-security
Copies the running configuration to the startup
configuration.
(Optional)
copy running-config startup-config
Example:
Step 4
switch(config)# copy running-config startup-config
Enabling or Disabling Port Security on a Layer 2 Interface
You can enable or disable port security on a Layer 2 interface. By default, port security is disabled on all
interfaces.
When you disable port security on an interface, all switchport port security configuration for the interface is
lost.
Before you begin
You must have enabled port security globally.
If a Layer 2 Ethernet interface is a member of a port-channel interface, you cannot enable or disable port
security on the Layer 2 Ethernet interface.
If any member port of a secure Layer 2 port-channel interface has port security enabled, you cannot disable
port security for the port-channel interface unless you first remove all secure member ports from the port-channel
interface.
SUMMARY STEPS
1.
configure terminal
2.
Enter one of the following commands:
•
interface ethernet slot
/
port
•
interface port-channel channel-number
3.
switchport
4.
[
no
]
switchport port-security
5.
(Optional)
show running-config port-security
6.
(Optional)
copy running-config startup-config
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
312
Configuring Port Security
Enabling or Disabling Port Security on a Layer 2 Interface