CLI Guide

Layer 2 Switching Commands 308
Add a sticky mode statically locked MAC address to trunk port Gi1/0/3 and
VLAN 33.
console(config)#vlan 33
console(config-vlan33)#interface gi1/0/3
console(config-if-Gi1/0/3)#switchport mode trunk
console(config-if-Gi1/0/3)#switchport port-security mac-address sticky
0011.2233.4455 vlan 33
Remove a sticky mode MAC address from trunk port Gi1/0/3 and VLAN 33.
console(config)#vlan 33
console(config-vlan33)#interface gi1/0/3
console(config-if-Gi1/0/3)#switchport mode trunk
console(config-if-Gi1/0/3)#no switchport port-security mac-address
0011.2233.4455 vlan 33
Convert all dynamically learned MAC addresses on trunk port gi1/0/3 to
sticky MAC addresses and save the running-config so the configuration will
persist across reboots.
console(config)#vlan 33
console(config-vlan33)#interface gi1/0/3
console(config-if-Gi1/0/3)#switchport mode trunk
console(config-if-Gi1/0/3)#switchport port-security mac-address sticky
console(config)#do write
Convert all sticky MAC addresses on trunk port gi1/0/3 to sticky MAC
addresses and save the running-config so the configuration will persist across
reboots.
console(config)#vlan 33
console(config-vlan33)#interface gi1/0/3
console(config-if-Gi1/0/3)#switchport mode trunk
console(config-if-Gi1/0/3)#switchport port-security mac-address sticky
console(config)#do write
switchport port-security (Interface Configuration)
Use the switchport port-security command to enable or configure port
security (MAC locking) globally. Use the no form of the command to disable
port security globally.