2-1058
Catalyst 4500 Series Switch Cisco IOS Command Reference—Release IOS XE 3.4.0SG and IOS 15.1(2)SG)
OL-27596 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
switchport port-security
Switch(config)# interface fastethernet 5/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# switchport port-security maximum 1 vlan voice
Switch(config-if)# switchport port-security maximum 1 vlan access
Switch(config-if)# end
This example shows how to configure a port to shut down only the VLAN if a violation occurs:
Switch(config)# interface gigabitethernet 5/1
Switch(config)# switchport port-security violation shutdown vlan
Note Sending traffic to the ports causes the system to configure the port with sticky secure addresses.
You can verify your settings by using the show port-security address privileged EXEC command.
Related Commands Command Description
show interfaces switchport Displays the administrative and operational status of a
switching (nonrouting) port.
show port-security Displays the port security settings for an interface or for the
switch.
switchport block Prevents the unknown multicast or unicast packets from
being forwarded.