Administrator Guide

Table Of Contents
Layer 2 Switching Commands 296
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.
Syntax
switchport port-security [mac-address { sticky | [sticky]
mac-address
vlan
{
vlan-id
}}] | dynamic
value
| maximum
value
| violation {protect |
shutdown}]
no switchport port-security [mac-address {sticky | [sticky]
mac-address
vlan
{
vlan-id
}}] | dynamic | maximum | violation]
2CSNXXX_SWUM204.book Page 296 Monday, January 25, 2016 1:25 PM