43-25
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 43 Configuring Port Security Configuring Port Security on Voice 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 an interface (including
any port channel interface). The VLAN keyword allows you to clear port security MACs on a per-VLAN
per-port basis.
Note Each port security-configured interface accepts one MAC-address by default. With port security port
level port-security configuration takes precedence over VLAN level port-security configuration. To
allow one MAC-address each for voice and data VLAN, configure the port for a maximum of greater
than or equal to two addresses.
Examples of Voice Port Security
The following examples are provided:
Example 1: Configuring Maximum MAC Addresses for Voice and Data VLANs, page 43-25
Example 2: Configuring Sticky MAC Addresses for Voice and Data VLANs, page 43-26

Example 1: Configuring Maximum MAC Addresses for Voice and Data VLANs

This example shows how to designate a maximum of one MAC address for a voice VLAN (for a Cisco
IP Phone, let’s say) and one MAC address for the data VLAN (for a PC, let’s say) on Fast Ethernet
interface 5/1 and to verify the configuration:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface fa5/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 2
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# switchport port-security maximum 1 vlan voice
Switch(config-if)# switchport port-security maximum 1 vlan access
Switch(config-if)# end
Note Sending traffic to the ports causes the system to configure the port with sticky secure addresses.
Step 9 Switch(config-if)# end Returns to privileged EXEC mode.
Step 10 Switch# show port-security address
interface interface_id
Switch# show port-security address
Verifies your entries.
Command Purpose