Purpose
Command or Action
Example:
If you use the
interface
keyword, you remove all
dynamically learned addresses on the interface that you
specify.
switch(config)# clear port-security dynamic
interface ethernet 2/1
If you use the
address
keyword, you remove the single,
dynamically learned address that you specify.
Use the
vlan
keyword if you want to further limit the
command to removing an address or addresses on a
particular VLAN.
Displays secure MAC addresses.
(Optional)
show port-security address
Example:
Step 3
switch(config)# show port-security address
Copies the running configuration to the startup
configuration.
(Optional)
copy running-config startup-config
Example:
Step 4
switch(config-if)# copy running-config
startup-config
Configuring a Maximum Number of MAC Addresses
You can configure the maximum number of MAC addresses that can be learned or statically configured on
a Layer 2 interface. You can also configure a maximum number of MAC addresses per VLAN on a Layer 2
interface. The largest maximum number of addresses that you can configure on an interface is 1025 addresses.
The system maximum number of addresses is 8192.
By default, an interface has a maximum of one secure MAC address. VLANs have no default maximum
number of secure MAC addresses.
When you specify a maximum number of addresses that is less than the number of addresses already learned
or statically configured on the interface, the device rejects the command. To remove all addresses learned by
the dynamic method, use the
shutdown
and
no shutdown
commands to restart the interface.
Note
Before you begin
You must have enabled port security globally.
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 maximum number
[
vlan vlan-ID
]
4.
(Optional)
show running-config port-security
Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 9.x
319
Configuring Port Security
Configuring a Maximum Number of MAC Addresses