ECS2020 Series CLI Reference Guide R04
26
7 Port Security
7.1
Configure-relevant commands
Port-security
After you enable port-security, configure the MAC address limit for the port. The no form of the command
disables port-security.
port-security [address-limit ] { Number of limitation} action {[discard|forward|shutdown] }
no port-security
The port security function on the switch is disabled by default.
Interface configuration mode
Enable port security. When the port has learned MACs up to the limit number,
packets are then discarded.
The following example configures port gig0 / 1 with the maximum MAC learning
number of 200. Packets with MACs over the limit are discarded.
ECS2020-10P(config-if-GigabitEthernet0/1)# port-security address-limit 200
action discard
7.2
Display-relevant commands
show port-security
Displays information about port security.
Show port-security interface {port-id}
Null
Parameter
Command
Parameter
Example
Default
Mode
Usage
Default
Parameter
Description
number of limitation
Limit the number of MACs in the range of 1-256.
discard|forward|shutdown
Action to be taken when the limit is reached.
Command
Description
no port-security
Turn off port security
Parameter
Description
show port-security interface {port-id}
Display the port security configuration
information of the specified port