Cisco WS-C3560X-24T-L Command Reference - Page 668
switchport, port-security, mac-address sticky, no switchport port-security mac-address sticky
View all Cisco WS-C3560X-24T-L manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 668 highlights
switchport port-security Chapter 2 Catalyst 3560 Switch Cisco IOS Commands Examples Sticky secure MAC addresses have these characteristics: • When you enable sticky learning on an interface by using the switchport port-security mac-address sticky interface configuration command, the interface converts all the dynamic secure MAC addresses, including those that were dynamically learned before sticky learning was enabled, to sticky secure MAC addresses and adds all sticky secure MAC addresses to the running configuration. • If you disable sticky learning by using the no switchport port-security mac-address sticky interface configuration command or the running configuration is removed, the sticky secure MAC addresses remain part of the running configuration but are removed from the address table. The addresses that were removed can be dynamically reconfigured and added to the address table as dynamic addresses. • 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. 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 gigabitethernet 0/2 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 and a VLAN ID on a port: Switch(config)# interface gigabitethernet 0/2 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport port-security Switch(config-if)# switchport port-security mac-address 1000.2000.3000 vlan 3 This example shows how to enable sticky learning and to enter two sticky secure MAC addresses on a port: Switch(config)# interface gigabitethernet 0/2 Switch(config-if)# switchport port-security mac-address sticky Switch(config-if)# switchport port-security mac-address sticky 0000.0000.4141 Switch(config-if)# switchport port-security mac-address sticky 0000.0000.000f You can verify your settings by using the show port-security privileged EXEC command. 2-636 Catalyst 3560 Switch Command Reference 78-16405-05