Users Guide

Table Of Contents
Layer 2 Switching Commands 317
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 [dynamic {
value
| vlan {
vlan-id
| range
vlan-
range
} maximum
limit
} | mac-address {
mac-address
vlan
vlan-id
| sticky
[
mac-addr
vlan
vlan-id
] } | maximum {
val
} | violation {protect |
shutdown} ]
no switchport port-security [dynamic [vlan {
vlan-id
| range
vlan-range
} ] |
mac-address {
mac-addr
vlan
vlan-id
| sticky} | maximum | violation ]
mac-address — The static MAC address to be configured on the interface
and VLAN.
vlan-id
— The VLAN identifier on which to configure the MAC address.
dynamic — Configure the maximum number of dynamic MAC addresses
that be be learned on the interface. Setting the dynamic limit to 0 causes
all received packets with non-static MAC addresses to be considered as
violations.
sticky – Configure a sticky MAC address on the interface. If the sticky
parameter not given, a statically locked MAC address is configured on the
interface.
maximum <
limit
> — Configure the maximum number of static MAC
addresses that may be learned on the interface or VLAN.
violation—Configure the interface to: