55-19
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 55 Configuring Port Security
Configuring Port Security on Trunk Ports
Examples of Trunk Port Security
The following examples are provided:
•
Example 1: Configuring a Maximum Limit of Secure MAC Addresses for All VLANs, page 55-19
•
Example 2: Configuring a Maximum Limit of Secure MAC Addresses for Specific VLANs,
page 55-20
•
Example 3: Configuring Secure MAC Addresses in a VLAN Range, page 55-20
Example 1: Configuring a Maximum Limit of Secure MAC Addresses for All VLANs
This example shows how to configure a secure MAC-address and a maximum limit of secure MAC
addresses on Gigabit Ethernet interface 1/1 for all VLANs:
Switch#
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#
interface g1/1
Switch(config-if)#
switchport trunk encapsulation dot1q
Switch(config-if)#
sw mode trunk
Switch(config-if)#
switchport port-security
Switch(config-if)#
switchport port-security maximum 3
Switch#
show port-security in gi1/1 vlan
Default maximum: 3
VLAN Maximum Current
1 3 0
2 3 0
3 3 0
4 3 0
Step 4
Switch(config-if)#
switchport port-security
maximum
value
vlan
Configures a maximum number of secure mac-addresses
for each VLAN on the interface that are not explicitly
configured with a maximum mac-address limit. See the
“Maximum Number of Secure MAC Addresses” section
on page 55-4
.
Step 5
Switch(config-if)#
vlan-range
range
Enters VLAN range sub-mode.
Note
You can specify single or multiple VLANs.
Step 6
Switch(config-if-vlan-range)#
port-security maximum
value
Configures a maximum number of secure MAC addresses
for each VLAN.
Step 7
Switch(config-if-vlan-range)#
no port-security maximum
Removes a maximum number of secure MAC addresses
configuration for all the VLANs. Subsequently, the
maximum value configured on the port will be used for all
the VLANs.
Step 8
Switch(config-if-vlan-range)# [
no
]
port-security
mac-address
mac_address
Configures a secure MAC-address on a range of VLANs.
Step 9
Switch(config-if-vlan-range)# [
no
]
port-security
mac-address sticky
mac_address
Configures a sticky MAC-address on a range of VLANs.
Step 10
Switch(config-if-vlan-range)#
end
Returns to interface configuration mode.
Step 11
Switch(config-if)#
end
Returns to privileged EXEC mode.
Command
Purpose
Summary of Contents for Catalyst 4500 Series
Page 2: ......
Page 4: ......
Page 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...