3.10.10 Port Security Configuration
Use this command to configure the Port Security global settings. If aging is enabled, secured MAC addresses are subject to aging with a specified period and hold time (how long a MAC address is held in the MAC table if it has been found to violate the limit).
Command Syntax:
port-security aging
port-security aging time <aging_time>
port-security hold time <hold_time>
Argument | Description | |
Parameter |
| The Aging Period can be set to a number between 10 and 10000000 seconds with a default of 3600 seconds. |
| Valid range is between 10 and 10000000 seconds with a default of 300 seconds. | |
Default | N.A | |
Mode | Global Configuration mode | |
Usage | Enable port security aging. To disable port security aging or revert to the default aging period and hold time, use the ‘no’ version of the command. | |
Example | Example 1: Enable aging.
Example 2: Set the aging period and hold time to 600 seconds.
|
- Protect: Do not allow more than the Limit MAC addresses on the port, but take no further action.
- Restrict: If the Limit is reached, subsequent MAC addresses on the port are counted and marked as violating. Such MAC addresses are removed from the MAC table when the hold time expires. At most Violation Limit MAC addresses can be marked as violating at any given time.
- Shutdown: If the Limit is reached, one additional MAC address causes the port to be shut down.
Command Syntax:
port-security
port-security maximum <limit>
port-security maximum-violation <violate_limit>
port-security violation { protect | restrict | shutdown }
port-security mac-address { [ sticky ] [ <mac> [ vlan <vlan_id> ] ] }
no port-security mac-address { [ sticky ] [ <mac> [ vlan <vlan_id> ] ] }
Argument | Description | |
Parameter |
| The maximum number of MAC addresses that can be secured on this port. This number cannot exceed 1023. The default value is 4. |
| The maximum number of MAC addresses that can be marked as violating on this port. This number cannot exceed 1023. Default is 4. It is only used when Violation mode is Restrict. | |
| MAC address in the format XX:XX:XX:XX:XX:XX | |
Default | N.A | |
Mode | Port List Interface mode | |
Usage | Enable port security. To disable port security or revert to the default values, use the ‘no’ version of the command. | |
Example | Example 1: Enable security on port 2.
Example 2: Set the violation mode to Restrict and set the violation limit to 100.
|