21-9
Catalyst 2950 and Catalyst 2955 Switch Software Configuration Guide
OL-10101-02
Chapter 21 Configuring Port-Based Traffic Control
Configuring Port Security
When a voice VLAN is configured on a secure port that is also configured as a sticky secure port,
all addresses seen on the voice VLAN are learned as dynamic secure addresses, and all addresses
seen on the access VLAN (to which the port belongs) are learned as sticky secure addresses.
You cannot configure port security on a per-VLAN basis.
The switch does not support port security aging of sticky secure MAC addresses.
The protect and restrict options cannot be simultaneously enabled on an interface.
Table 21-3 summarizes port security compatibility with other features configured on a port.
Enabling and Configuring Port Security
Beginning in privileged EXEC mode, follow these steps to restrict input to an interface by limiting and
identifying MAC addresses of the stations allowed to access the port:
Tab l e 21-3 Port Security Compatibility with Other Catalyst 2950 and 2955 Features
Type of Port Compatible with Port Security
DTP1 port2
1. DTP = Dynamic Trunking Protocol
2. A port configured with the switchport mode dynamic interface configuration command.
No
Trunk port No
Dynamic-access port3
3. A VLAN Query Protocol (VQP) port configured with the switchport access vlan dynamic interface
configuration command.
No
SPAN source port Yes
SPAN destination port No
EtherChannel No
Protected port Yes
IEEE 802.1x port Ye s
Voice VLAN port4
4. You must set the maximum allowed secure addresses on the port to two plus the maximum number of secure
addresses allowed on the access VLAN.
Yes
Command Purpose
Step 1 configure terminal Enter global configuration mode.
Step 2 interface interface-id Specify the interface to configure, and enter interface configuration
mode.
Step 3 switchport mode access Set the interface mode as access; an interface in the default mode
(dynamic desirable) cannot be configured as a secure port.
Step 4 switchport port-security Enable port security on the interface.
Step 5 switchport port-security maximum
value
(Optional) Set the maximum number of secure MAC addresses for the
interface. The range is 1 to 132; the default is 1. If an interface is
configured for voice VLAN, configure a value of two secure MAC
addresses.