feature port-security

To enable port security on Layer 2 interfaces, use the feature port-security command. To disable port security, use the no form of this command.

feature port-security

no feature port-security

Syntax Description

This command has no arguments or keywords.

Command Default

Disabled

Command Modes

Global configuration mode

Command History

Release
Modification
5.1(3)N1(1)
This command was introduced.

Usage Guidelines

Use the port security feature to secure a port by limiting and identifying the MAC addresses of the switches that are allowed to access the port.

You can enable port security on a virtual port channel (vPC) port only if the following occurs:

This command does not require a license.

Examples

This example shows how to enable port security on the switch:

switch# configure terminal
switch(config)# feature port-security
switch(config)#
 

This example shows how to disable port security on the switch:

switch# configure terminal
switch(config)# no feature port-security
switch(config)#
 

Related Commands

Command
Description
show feature
Displays the features that are enabled or disabled on the switch.
show port-security
Displays the port security configuration information.
switchport port-security
Configures the switchport parameters to establish port security.