55-10
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 55 Configuring Port Security
Configuring Port Security on Access Ports
Note To clear dynamically learned port security MAC addresses in the CAM table, use the clear port-security
dynamic command. The address keyword enables you to clear a secure MAC addresses. The interface
keyword enables you to clear all secure addresses on any interface (including any port channel interface).
The VLAN keyword allows you to clear port security MACs on a per-VLAN per-port basis.
Examples of Port Security on Access Ports
The following examples are provided:
• Example 1: Setting Maximum Number of Secure Addresses, page 55-11
• Example 2: Setting a Violation Mode, page 55-11
• Example 3: Setting the Aging Timer, page 55-11
• Example 4: Setting the Aging Timer Type, page 55-12
• Example 5: Configuring a Secure MAC Address, page 55-12
• Example 6: Configuring Sticky Port Security, page 55-13
• Example 7: Setting a Rate Limit for Bad Packets, page 55-13
• Example 8: Clearing Dynamic Secure MAC Addresses, page 55-14
Step 11
Switch(config-if)# [no] switchport port-security
mac-address mac_address sticky [vlan [voice |
access]]
Specifies the sticky mac-address for the interface.
When you specify the vlan keyword, the mac-address
becomes sticky in the specified VLAN.
To delete a sticky secure MAC addresses from the address
table, use the
no switchport port-security mac-address mac_address
sticky command. To convert sticky to dynamic addresses,
use the no switchport port-security mac-address sticky
command.
Note This command only applies to access, PVLAN
host, and PVLAN promiscuous mode. For more
details on PVLAN or trunk or regular trunk mode,
refer to the “Configuring Port Security on Trunk
Ports” section on page 55-17.
Step 12
Switch(config-if)# end
Returns to privileged EXEC mode.
Step 13
Switch# show port-security address
interface interface_id
Switch# show port-security address
Verifies your entries.
Command Purpose