Cisco Systems 4500 Switch User Manual


  Open as PDF
of 1504
 
43-10
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 43 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 43-11
Example 2: Setting a Violation Mode, page 43-11
Example 3: Setting the Aging Timer, page 43-11
Example 4: Setting the Aging Timer Type, page 43-12
Example 5: Configuring a Secure MAC Address, page 43-12
Example 6: Configuring Sticky Port Security, page 43-13
Example 7: Setting a Rate Limit for Bad Packets, page 43-13
Example 8: Clearing Dynamic Secure MAC Addresses, page 43-14
Step 10
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 43-17.
Step 11
Switch(config-if)# end
Returns to privileged EXEC mode.
Step 12
Switch# show port-security address
interface interface_id
Switch# show port-security address
Verifies your entries.
Command Purpose