25-15
Catalyst 3750 Switch Software Configuration Guide
OL-8550-02
Chapter 25 Configuring Port-Based Traffic Control
Configuring Port Security
You must specifically delete configured secure MAC addresses from the address table by using the
no
switchport port-security mac-address
mac-address
interface configuration command.
This example shows how to enable port security on a port and to set the maximum number of secure
addresses to 50. The violation mode is the default, no static secure MAC addresses are configured, and
sticky learning is enabled.
Switch(config)#
interface gigabitethernet1/0/1
Switch(config-if)#
switchport mode access
Switch(config-if)#
switchport port-security
Switch(config-if)#
switchport port-security maximum 50
Switch(config-if)#
switchport port-security mac-address sticky
This example shows how to configure a static secure MAC address on VLAN 3 on a port:
Switch(config)#
interface gigabitethernet1/0/2
Switch(config-if)#
switchport mode trunk
Switch(config-if)#
switchport port-security
Switch(config-if)#
switchport port-security mac-address 0000.02000.0004 vlan 3
This example shows how to enable sticky port security on a port, to manually configure MAC addresses
for data VLAN and voice VLAN, and to set the total maximum number of secure addresses to 20 (10 for
data VLAN and 10 for voice VLAN).
Switch(config)#
interface FastEthernet1/0/1
Switch(config-if)#
switchport access vlan 21
Switch(config-if)#
switchport mode access
Switch(config-if)#
switchport voice vlan 22
Switch(config-if)#
switchport port-security
Switch(config-if)#
switchport port-security maximum 20
Switch(config-if)#
switchport port-security violation restrict
Switch(config-if)#
switchport port-security mac-address sticky
Switch(config-if)#
switchport port-security mac-address sticky 0000.0000.0002
Switch(config-if)#
switchport port-security mac-address 0000.0000.0003
Switch(config-if)#
switchport port-security mac-address sticky 0000.0000.0001 vlan voice
Switch(config-if)#
switchport port-security mac-address 0000.0000.0004 vlan voice
Switch(config-if)#
switchport port-security maximum 10 vlan access
Switch(config-if)#
switchport port-security maximum 10 vlan voice
Enabling and Configuring Port Security Aging
You can use port security aging to set the aging time for all secure addresses on a port. Two types of
aging are supported per port:
•
Absolute—The secure addresses on the port are deleted after the specified aging time.
•
Inactivity—The secure addresses on the port are deleted only if the secure addresses are inactive for
the specified aging time.
Use this feature to remove and add devices on a secure port without manually deleting the existing secure
MAC addresses and to still limit the number of secure addresses on a port. You can enable or disable the
aging of secure addresses on a per-port basis.
Beginning in privileged EXEC mode, follow these steps to configure port security aging:
Command
Purpose
Step 1
configure terminal
Enter global configuration mode.
Step 2
interface
interface-id
Specify the interface to be configured, and enter interface
configuration mode.
Содержание 3750G - Catalyst Integrated Wireless LAN Controller
Страница 80: ...1 28 Catalyst 3750 Switch Software Configuration Guide OL 8550 02 Chapter 1 Overview Where to Go Next ...
Страница 606: ...27 8 Catalyst 3750 Switch Software Configuration Guide OL 8550 02 Chapter 27 Configuring UDLD Displaying UDLD Status ...
Страница 670: ...31 18 Catalyst 3750 Switch Software Configuration Guide OL 8550 02 Chapter 31 Configuring SNMP Displaying SNMP Status ...
Страница 1048: ...41 20 Catalyst 3750 Switch Software Configuration Guide OL 8550 02 Chapter 41 Configuring MSDP Monitoring and Maintaining MSDP ...
Страница 1086: ...43 26 Catalyst 3750 Switch Software Configuration Guide OL 8550 02 Chapter 43 Troubleshooting Using the crashinfo Files ...
Страница 1104: ...B 4 Catalyst 3750 Switch Software Configuration Guide OL 8550 02 Appendix B Supported MIBs Using FTP to Access the MIB Files ...