Cisco Catalyst 3550 Command Reference Manual page 618

Multilayer switch
Hide thumbs Also See for Catalyst 3550:
Table of Contents

Advertisement

switchport port-security
Examples
This example shows how to enable port security on a port and to set the maximum number of secure
addresses to 5. The violation mode is the default, and no secure MAC addresses are configured.
Switch(config)# interface fastethernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 5
This example shows how to configure a secure MAC address on a port:
Switch(config)# interface fastethernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security mac-address 1000.2000.3000
This example shows how to enable sticky learning:
Switch(config-if)# switchport port-security mac-address sticky
This example shows how to configure a secure MAC address on a trunk port:
Switch(config)# interface fastethernet0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security mac-address 1000.2000.3000 vlan 9
This example shows how to configure a maximum of 5 secure MAC addresses on VLAN 9:
Switch(config)# interface fastethernet0/1
Switch(config-if)# switchport port-security maximum 5 vlan 9
You can verify the settings for all secure ports or the specified port by using the show port-security
privileged EXEC command.
Related Commands
Command
clear port-security
Catalyst 3550 Multilayer Switch Command Reference
2-592
When you configure sticky secure MAC addresses by using the switchport port-security
mac-address sticky mac-address interface configuration command, these addresses are added to
the address table and the running configuration. If port security is disabled, the sticky secure MAC
addresses remain in the running configuration.
If you save the sticky secure MAC addresses in the configuration file, when the switch restarts or
the interface shuts down, the interface does not need to relearn these addresses. If you do not save
the sticky secure addresses, they are lost. If sticky learning is disabled, the sticky secure MAC
addresses are converted to dynamic secure addresses and are removed from the running
configuration.
If you disable sticky learning and enter the switchport port-security mac-address sticky
mac-address interface configuration command, an error message appears, and the sticky secure
MAC address is not added to the running configuration.
Chapter 2 Catalyst 3550 Switch Cisco IOS Commands
Description
Deletes from the MAC address table a specific secure address or all
the secure addresses on an interface.
OL-8566-01

Advertisement

Table of Contents
loading

Table of Contents