Administrator Guide

Layer 2 Switching Commands 300
console(config)#interface gi1/0/3
console(config-if-gi1/0/3)#switchport port-security
console(config-if-gi1/0/3)#switchport port-security mac-address sticky
Add a 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
0011.2233.4455 vlan 33
Add a sticky mode staticly locked 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 33 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 33 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
2CSNXXX_SWUM204.book Page 300 Monday, January 25, 2016 1:25 PM