Configure LACP on a Port
Important
Changes made at the global level override and reset the port-level configuration.
Configure LACP on a port to enable or disable LACP on the selected ports.
You must use the LACP keys to determine which ports are eligible for link aggregation. The LACP keys are defined by the ports after you configure the multilink trunk. You can aggregate the ports key that match the MLT key into that multilink trunk.
Before you begin
When enabling or disabling LACP on a port, as a best practice, disable the port first and re-enable the port after the configuration is complete.
About this task
The minimum LACP configuration is as follows:
-
Assign a given key to a set of ports. In the following procedure steps, you must assign the key before you enable LACP on the port.
-
Assign the same key to an MLT with no members. The ports will automatically become MLT members.
Keys do not need to match between two LACP peers.
A port can operate in active or passive mode. You can configure a port to be an individual link or an aggregated link.
Note
When using LACP with private VLANs, configure the private VLAN at the interface level.
Procedure
Examples
Configure LACP on ports 1/2 and 1/3:
Switch:1>enable Switch:1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch:1(config)#interface gigabitethernet 1/2–1/3 Switch:1(config-if)#lacp key 100 Switch:1(config-if)#lacp aggregation enable Switch:1(config-if)#lacp enable
Return the key to the default value:
Switch:1>enable Switch:1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch:1(config)#interface gigabitethernet 1/2–1/3 Switch:1(config-if)#no lacp aggregation enable Switch:1(config-if)#default lacp key Switch:1(config-if)#lacp aggregation enable
Variable Definitions
The following table defines parameters for the lacp command.
Note
All parameters beginning with partner are for debug purposes only. If you configure these commands locally and there is a mismatch with what is learned from the partner, there will be trace or log messages.
Variable |
Value |
---|---|
aggr-wait-time <200–2000> |
Configures the aggregation wait time (in milliseconds) for this port. The default is 2000. |
aggregation enable |
Enables aggregation on the port, which makes it an aggregated link. |
enable |
Enables LACP for this port. The default is disabled. |
fast-periodic-time <200–20000> |
Configures the fast periodic time (in milliseconds) for this port. The default is 1000 ms. |
key <1-512|defVal> |
Configures the aggregation key for this port. Enter the aggregation key value or defVal (1024 + IfIndex) To return a configured key to the default value, you must first disable LACP aggregation on the port. |
mode {active | passive} |
Configures the LACP mode to be active or passive. |
partner-key <0–65535> |
Configures the partner administrative key. |
partner-port <0–65535> |
Configures the partner administrative port value. |
partner-port-priority <0–65535> |
Configures the partner administrative port priority value. |
partner-state <0-255 | 0x0-0xff> |
Configures the partner administrative state bitmask. Specify the partner administrative state bitmap in the range 0x0–0xff. The bit to state mapping is Exp, Def, Dis, Col, Syn, Agg, Time, and Act. For example, to set the two partner-state parameters
specify a value of 0x05 (bitmap = 00000101). |
partner-system-id <0x00:0x00:0x00:0x00:0x00:0x00> |
Configures the partner administrative system ID. Specify a MAC address in the format 0x00:0x00:0x00:0x00:0x00:0x00. |
partner-system-priority <0–65535> |
Configures the partner administrative system priority value. |
priority <0–65535> |
Configures the port priority. The default value is 32768. To set this option to the default value, use the default operator with the command. |
slow-periodic-time <10000-30000> |
Configures the slow periodic time for this port. The default is 30000 ms. To set this option to the default value, use the default operator with the command. |
system-priority <0-65535> |
Configures the system priority for this port. The default is 32768. |
timeout-scale <2-10> |
Configures a timeout scale for this port. The default value is 3. The LACP timeout is equal to the slow periodic time or fast periodic time multiplied by the timeout-scale, depending how you configure the timeout-time variable. |
timeout-time {long|short} |
Configures the timeout to either long or short. |