Switchport Port-Security - Cisco Catalyst 3750 Command Reference Manual

Hide thumbs Also See for Catalyst 3750:
Table of Contents

Advertisement

Chapter 2 Catalyst 3750 Switch Cisco IOS Commands

switchport port-security

Use the switchport port-security interface configuration command without keywords on the switch
stack or on a standalone switch to enable port security on the interface. Use the keywords to configure
secure MAC addresses, sticky MAC address learning, a maximum number of secure MAC addresses, or
the violation mode. Use the no form of this command to disable port security or to set the parameters to
their default states.
Syntax Description
aging
mac-address mac-address
vlan vlan-id
mac-address sticky
[mac-address]
maximum value
vlan [vlan-list]
violation
78-16181-03
switchport port-security [aging] [mac-address mac-address [vlan vlan-id] | mac-address sticky
[mac-address]] [maximum value [vlan vlan-list]] [violation {protect | restrict | shutdown}]
no switchport port-security [aging] [mac-address mac-address [vlan vlan-id] | mac-address
sticky [mac-address]] [maximum value [vlan vlan-list]] [violation {protect | restrict |
shutdown}]
(Optional) See the
switchport port-security aging
(Optional) Specify a secure MAC address for the interface by entering
a 48-bit MAC address. You can add additional secure MAC addresses
up to the maximum value configured.
(Optional) On a trunk port only, specify the VLAN ID and the MAC
address. If no VLAN ID is specified, the native VLAN is used.
(Optional) Enable the interface for sticky learning by entering only the
mac-address sticky keywords. When sticky learning is enabled, the
interface adds all secure MAC addresses that are dynamically learned to
the running configuration and converts these addresses to sticky secure
MAC addresses.
(Optional) Enter a mac-address to specify a sticky secure MAC address.
(Optional) Set the maximum number of secure MAC addresses for the
interface.The maximum number of secure MAC addresses that you can
configure on a switch stack is set by the maximum number of available
MAC addresses allowed in the system. This number is determined by
the active Switch Database Management (SDM) template. See the
prefer
command. This number represents the total of available MAC
addresses, including those used for other Layer 2 functions and any
other secure MAC addresses configured on interfaces.
The default setting is 1.
(Optional) For trunk ports, you can set the maximum number of secure
MAC addresses on a VLAN. If the vlan keyword is not entered, the
default value is used.
vlan—set a per-VLAN maximum value.
vlan vlan-list—set a per-VLAN maximum value on a range of
VLANs separated by a hyphen or a series of VLANs separated by
commas. For nonspecified VLANs, the per-VLAN maximum value
is used.
(Optional) Set the security violation mode or the action to be taken if
port security is violated. The default is shutdown.
Catalyst 3750 Switch Command Reference
switchport port-security
command.
sdm
2-575

Advertisement

Table of Contents
loading

Table of Contents