18-4
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 18 Configuring Port-Based Traffic Control
Configuring Port Security
Beginning in privileged EXE C mode, foll ow these step s to define a port as a pro tected port:
To disable protected port, use the no switchport protected int erface co nfiguration co mman d.
This exam ple sh ows how to con figure Gigabi t E ther ne t i nte rface 0/1 a s a p rot ec ted por t a nd veri fy the
configuration:
Switch# configure terminal
Switch(config)# interface gigabitethernet0/1
Switch(config-if)# switchport protected
Switch(config-if)# end
Switch# show interfaces gigabitethernet0/1 switchport
Name: Gi0/1
Switchport: Enabled
<output truncated>
Protected: True
Unknown unicast blocked: disabled
Unknown multicast blocked: disabled

Configuring Po rt 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 MA C addresses to a secure
port, the port does not forward packets with source addresses outs ide the group of defined a ddresses. If
you limi t t he num be r of se cu re M AC a ddresse s to o ne and ass ig n a singl e se cu re M AC addres s, th e
workstation attached to that port is assured the full bandwidth of the port.
If a port is configured as a secure port and the maximum number of secure MAC addresses is reached,
when the MAC address of a station attempting to access the port is different from any of the identified
secure MAC addresses, a security violation occurs. Also, if a station with a secure MAC address
configured or learne d on one secur e port attemp ts to acc ess another se cure port, a violat ion is flagg ed.
These sec ti ons i nclu de po rt se curi ty c onfigurati on inf orm a tion and pr oced ure s:
Understa ndin g Po rt Se curi ty, page 1 8-5
Default Por t Security C onfiguration , page 18-7
Port Secur ity Configurati on Guidel ines, pa ge 18-7
Enab ling a nd Co nfiguring Po rt Se c urity, page 1 8-7
Enablin g a nd Configur ing Po rt Se curi ty Agi ng, p ag e 18- 10
Command Purpose
Step 1 configure terminal Enter globa l configurati on mode.
Step 2 interface interface-id Specify the type and number of the physical interface to
configure, fo r examp le gigabitethernet0/1, a nd e nter
interface con figuration mo de.
Step 3 switchport protected Configure the interface to be a protected port.
Step 4 end Return to privileged EXEC mode.
Step 5 show interfaces interface-id switchport Ve rify yo ur ent ries.
Step 6 copy running-config startup-config (Optiona l) Save your entries in the co nfigurati on file.