Cisco 2950 - Catalyst Switch Configuration Manual page 463

Software configuration guide
Hide thumbs Also See for 2950 - Catalyst Switch:
Table of Contents

Advertisement

Chapter 22
Configuring Port-Based Traffic Control
Command
Step 8
switchport port-security mac-address
sticky
Step 9
end
Step 10
show port-security
Step 11
copy running-config startup-config
To return the interface to the default condition as not a secure port, use the no switchport port-security
interface configuration command. If you enter this command when sticky learning is enabled, the sticky
secure addresses remain part of the running configuration but are removed from the address table. All
addresses are now dynamically learned.
To return the interface to the default number of secure MAC addresses, use the no switchport
port-security maximum value interface configuration command.
To return the violation mode to the default condition (shutdown mode), use the no switchport
port-security violation {protect | restrict} interface configuration command.
To disable sticky learning on an interface, use the no switchport port-security mac-address sticky
interface configuration command. The interface converts the sticky secure MAC addresses to dynamic
secure addresses.
To delete a static secure MAC address from the address table, use the clear port-security configured
address mac-address privileged EXEC command. To delete all the static secure MAC addresses on an
interface, use the clear port-security configured interface interface-id privileged EXEC command.
To delete a dynamic secure MAC address from the address table, use the clear port-security dynamic
address mac-address privileged EXEC command. To delete all the dynamic addresses on an interface,
use the clear port-security dynamic interface interface-id privileged EXEC command.
To delete a sticky secure MAC addresses from the address table, use the clear port-security sticky
address mac-address privileged EXEC command. To delete all the sticky addresses on an interface, use
the clear port-security sticky interface interface-id privileged EXEC command.
This example shows how to enable port security on a port and to set the maximum number of secure
addresses to 50. The violation mode is the default, no static secure MAC addresses are configured, and
sticky learning is enabled.
Switch# configure terminal
Enter configuration commands, one per line.
Switch(config)# interface fastethernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 50
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# end
This example shows how to configure a static secure MAC address on a port and enable sticky learning:
Switch# configure terminal
Enter configuration commands, one per line.
Switch(config)# interface fastethernet0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security mac-address 0000.02000.0004
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# end
78-11380-10
Purpose
(Optional) Enable sticky learning on the interface.
Return to privileged EXEC mode.
Verify your entries.
(Optional) Save your entries in the configuration file.
End with CNTL/Z.
End with CNTL/Z.
Catalyst 2950 and Catalyst 2955 Switch Software Configuration Guide
Configuring Port Security
22-11

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 2955

Table of Contents