47-11
Cisco 7600 Series Router Cisco IOS Software Configuration Guide, Release 12.2SX
OL-4266-08
Chapter 47 Configuring Port Security
Configuring Port Security
Configuring a Static Secure MAC Address on a Port
To configure a static secure MAC address on a port, perform this task:
When configuring a static secure MAC address on a port, note the following information:
•
With Release 12.2(18)SXE and later releases, you can configure sticky secure MAC addresses if
port security with sticky MAC addresses is enabled (see the
“Enabling Port Security with Sticky
MAC Addresses on a Port” section on page 47-10
).
•
The maximum number of secure MAC addresses on the port, configured with the
switchport
port-security maximum
command, defines how many secure MAC addresses you can configure.
•
If you configure fewer secure MAC addresses than the maximum, the remaining MAC addresses are
learned dynamically.
•
With Release 12.2(18)SXE and later releases, port security is supported on trunks.
–
On a trunk, you can configure a static secure MAC address in a VLAN.
–
On a trunk, if you do not configure a VLAN for a static secure MAC address, it is secure in the
VLAN configured with the
switchport trunk native vlan
command.
This example shows how to configure a MAC address 1000.2000.3000 as secure on Fast Ethernet port
5/12 and verify the configuration:
Router#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#
interface fastethernet 5/12
Router(config-if)#
switchport port-security mac-address 1000.2000.3000
Router(config-if)#
end
Router#
show port-security address
Secure Mac Address Table
------------------------------------------------------------
Vlan Mac Address Type Ports
---- ----------- ---- -----
1 1000.2000.3000 SecureConfigured Fa5/12
Command
Purpose
Step 1
Router(config)#
interface
type
1
slot/port
1.
type
=
ethernet
,
fastethernet
,
gigabitethernet
, or
tengigabitethernet
Selects the LAN port to configure.
Step 2
Router(config-if)#
switchport port-security
mac-address
[
sticky
]
mac_address
[
vlan
vlan_ID
]
Configures a static MAC address as secure on the port.
Note
Per-VLAN configuration is supported only on
trunks.
Router(config-if)#
no switchport port-security
mac-address
[
sticky
]
mac_address
Clears a static secure MAC address from the port.
Step 3
Router(config-if)#
end
Exits configuration mode.
Step 4
Router#
show port-security address
Verifies the configuration.