22-7
Catalyst2950 and Catalyst2955 Switch Software Configuration Guide
78-11380-10
Chapter22 Configuring Port-Based Tra ffic Control Configuring Port Security
Configuring Port Security
You can use the port security feature to restrict input to an interface by limiting and identifying MAC
addresses of the stations allowed to access the port. When you assign secure MAC addresses to a secure
port, the port does not forward packets with source addresses outside the group of defined addresses.
This section includes information about these topics:
Understanding Port Security, page 22-7
Default Port Security Configuration, page 22-9
Port Security Configuration Guidelines, page 22-9
Enabling and Configuring Port Security, page 22-10
Enabling and Configuring Port Security Aging, page 22-12

Understanding Port Security

This section includes information about:
Secure MAC Addresses, page 22-7
Security Violations, page 22-8

Secure MAC Addresses

You can configure these types of secure MAC addresses:
Static secure MAC addressesThese are manually configured by us in g th e switchport
port-security mac-address mac-address interface configuration command, stored in the address
table, and added to the switch running configuration.
Dynamic secure MAC addressesThese are dynamically learned, stored only in the address table,
and removed when the switch restarts.
Sticky secure MAC addressesThese can be dynamically learned or manually configured, stored in
the address table, and added to the running configuration. If these addresses are saved in the
configuration file, the interface does not need to dynamically relearn them when t he switch resta rts.
Although sticky secure addresses can be manually configured, we do not recommend it.
You can configure an interface to convert the dynamic MAC addresses to sticky secure MAC addresses
and to add them to the running configuration by enabling sticky learning. To enable sticky learning, enter
the switchport port-security mac-address sticky interface configuration command. When you enter
this command, the interface converts all the dynamic secure MAC addresses, including those that were
dynamically learned before sticky learning was enabled, to sticky secure MAC addresses.
The sticky secure MAC addresses do not automatically become part of the configuration file, which is
the startup configuration used each time the swit ch restar ts. I f you sa v e the s tick y secure MA C addresse s
in the configuration file, when the switch restarts, the interface does not need to relearn the se addre sses.
If you do not save the configuration, they are lost.
If sticky learning is disabled, the sticky secure M AC address es ar e co nverted to dyn am ic sec ur e
addresses and are removed from the running configuration.
A secure port can have from 1 to 132 associated secure addresses. The total number of available secure
addresses on the switch is 1024.