Aggregated Ethernet LACP for Switches
Learn about aggregated Ethernet LACP, and how to configure LACP and LACP link protection.
Aggregated Ethernet LACP Overview
What is LACP?
Link Aggregation Control Protocol (LACP) is a method for bundling multiple physical Ethernet interfaces into a single logical interface. This is also known as an aggregated Ethernet interface. By default, these links don't actively exchange LACP protocol data units (PDUs), which contain important information about the link's status.
LACP Modes: Active versus Passive
You can configure LACP in one of two modes: active or passive.
-
In active mode, an Ethernet link actively transmits LACP PDUs to its partner.
-
In passive mode, a link only sends LACP PDUs when it receives them from the remote end. It's a "speak only when spoken to" approach.
For LACP to work, at least one of the two connected links must be in active mode. If both links are in passive mode, they won't exchange LACP packets, and the aggregated link won't be established.
Key Terminology and Standards
In the context of LACP, the link that is transmitting is called the actor, and the link that is receiving is called the partner. LACP is a standard defined in IEEE 802.3ad.
Even without LACP enabled, you can still configure both VLAN-tagged and untagged aggregated Ethernet interfaces. However, to initiate the transmission of LACP packets and ensure they're exchanged, you must enable LACP's active mode.
LACP was designed to achieve the following:
-
Automatic addition and deletion of individual links to the LAG without user intervention.
-
Link monitoring to check whether both ends of the bundle are connected to the correct group.
In a scenario where a dual-homed server is deployed with a switch, the network interface
cards form a LAG with the switch. During a server upgrade, the server might not be able to
exchange LACP PDUs. In such a situation, you can configure an interface to be in the
up state even if no PDUs are exchanged. Use the force-up
statement to configure an interface when the peer has limited LACP capability. The interface
selects the associated LAG by default, whether the switch and peer are both in active or
passive mode. When PDUs are not received, the partner is considered to be working in the
passive mode. Therefore, LACP PDU transmissions are controlled by the transmitting link.
If the remote end of the LAG link is a security device, LACP might not be supported because security devices require a deterministic configuration. In this case, do not configure LACP. All links in the LAG are permanently operational unless the switch detects a link failure within the Ethernet physical layer or data link layers.
When LACP is configured, it detects misconfigurations on the local end or the remote end of the link. Thus, LACP can help prevent communication failure:
-
When LACP is not enabled, a local LAG might attempt to transmit packets to a remote single interface, which causes the communication to fail.
-
When LACP is enabled, a local LAG cannot transmit packets unless a LAG with LACP is also configured on the remote end of the link.
Benefits
-
Increased Bandwidth—By combining multiple physical links, an aex provides a higher total bandwidth than any single member link could offer, without requiring new hardware. This is a cost-effective way to scale uplink capacity as network demands grow.
-
Enhanced Resiliency and Availability—If one member link within the bundle fails, traffic is automatically redistributed to the remaining active links, ensuring continuous network operation and minimizing downtime. This graceful degradation improves overall network reliability.
-
Load Balancing—Traffic is distributed across all member links in the bundle, optimizing the use of available bandwidth and reducing congestion on any single path[2][4]. Junos OS supports advanced load-balancing algorithms to efficiently utilize all links, even in mixed-rate configurations where member links operate at different speeds.
-
Efficient Bandwidth Utilization (Mixed-Rate Support)—Juniper devices allow aggregation of interfaces with different link speeds (such as 1 G, 10 G, 40 G, 100 G), known as mixed-rate aggregated Ethernet bundles. This flexibility enables networks to make full use of existing infrastructure, even as equipment is upgraded over time.
-
Simplified Management—The aggregated interface is treated as a single logical entity by the network, simplifying configuration, monitoring, and troubleshooting compared to managing multiple individual links.
-
Standards Compliance—Junos OS supports both static configuration and the IEEE 802.3ad LACP for dynamic negotiation and management of aggregated links, ensuring interoperability in multi-vendor environments.
Configure Aggregated Ethernet LACP
For aggregated Ethernet interfaces on EX Series switches, you can configure the Link Aggregation Control Protocol (LACP). LACP is one method of bundling several physical interfaces to form one logical interface. You can configure aggregated Ethernet interfaces with or without LACP enabled.
LACP was designed to achieve the following:
Automatic addition and deletion of individual links to the bundle without user intervention
Link monitoring to check whether both ends of the bundle are connected to the correct group
The Junos OS implementation of LACP provides link monitoring but not automatic addition and deletion of links.
Before you configure LACP for EX Series, be sure you have:
Configured the aggregated Ethernet bundles—also known as link aggregation groups (LAGs). See Configure Aggregated Ethernet Interfaces.
When LACP is enabled, the local and remote sides of the aggregated Ethernet links exchange protocol data units (PDUs), which contain information about the state of the link. You can configure Ethernet links to actively transmit PDUs, or you can configure the links to passively transmit them (sending out LACP PDUs only when they receive them from another link). One side of the link must be configured as active for the link to be up.
Do not add LACP to a LAG if the remote end of the LAG link is a security device, unless the security device supports LACP. Security devices often do not support LACP because they require a deterministic configuration.
To configure LACP:
See Also
Configure LACP Link Protection of Aggregated Ethernet Interfaces for Switches
You can configure LACP link protection and system priority at the global level on the switch or for a specific aggregated Ethernet interface. When using LACP link protection to protect a single link in the aggregated ethernet bundle, you configure only two member links for an aggregated Ethernet interface: one active and one standby. LACP link protection ensures that only one link—the link with the higher priority—is used for traffic. The other link is forced to stay in a waiting state.
Use the following command to verify the active and standby links.
user@host# run show interfaces redundancy Interface State Last change Primary Secondary Current status ae0 On secondary 14:56:50 xe-0/0/1 xe-0/0/2 both up
When using LACP link protection to protect multiple links in an aggregated ethernet bundle, you configure links into primary and backup subgroups. A link protection subgroup is a collection of ethernet links within the aggregated ethernet bundle. When you use link protection subgroups, you configure a primary subgroup and a backup subgroup. The configuration process includes assigning member links to each subgroup. When the configuration process is complete, the primary subgroup is used to forward traffic until a switchover event, such as a link failure, occurs and causes the backup subgroup to assume control of traffic that was travelling on the links in the primary subgroup within the bundle.
By default LACP link protection reverts to a higher-priority (lower-numbered) link when the higher-priority link becomes operational or when a higher-priority link is added to the aggregated Ethernet bundle. For priority purposes, LACP link protection treats subgroups like links. You can suppress link calculation by adding the non-revertive statement to the link protection configuration. In nonrevertive mode, when a link is active in sending and receiving LACP packets, adding a higher-priority link to the bundle does not change the status of the currently active link. It remains active.
If LACP link configuration is specified to be nonrevertive at the global [edit chassis] hierarchy level, you can specify the revertive statement in the LACP link protection configuration at the aggregated Ethernet interface level to override the nonrevertive setting for the interface. In revertive mode, adding a higher-priority link to the aggregated Ethernet bundle results in LACP recalculating the priority and switching the status from the currently active link to the newly added, higher-priority link.
When LACP link protection is enabled on both local and remote sides of the link, both sides must use the same mode (either revertive or nonrevertive).
Configuring LACP link configuration at the aggregated Ethernet level results in only the configured interfaces using the defined configuration. LACP interface configuration also enables you to override global (chassis) LACP settings.
Before you configure LACP link protection, be sure you have:
Configured the aggregated Ethernet bundles—also known as link aggregation groups (LAGs). For EX Series, see Configure Aggregated Ethernet Interfaces.
You can configure LACP link protection for all aggregated Ethernet interfaces on the switch by enabling it at the global level on the switch or configure it for a specific aggregated Ethernet interface by enabling it on that interface.
- Configure LACP Link Protection for a Single Link at the Global Level
- Configure LACP Link Protection for a Single Link at the Aggregated Interface Level
- Configure Subgroup Bundles to Provide LACP Link Protection to Multiple Links in an Aggregated Ethernet Interface
- Configure LACP Hold-UP Timer to Prevent Link Flapping on LAG Interfaces
Configure LACP Link Protection for a Single Link at the Global Level
To configure LACP link protection for aggregated Ethernet interfaces at the global level:
Configure LACP Link Protection for a Single Link at the Aggregated Interface Level
To enable LACP link protection for a specific aggregated Ethernet interface:
Configure Subgroup Bundles to Provide LACP Link Protection to Multiple Links in an Aggregated Ethernet Interface
You can configure link protection subgroup bundles to provide link protection for multiple links in an aggregated ethernet bundle.
Link protection subgroups allow you to provide link protection to a collection of Ethernet links within a LAG bundle, instead of providing protection to a single link in the aggregated ethernet bundle only. You can, for instance, configure a primary subgroup with three member links and a backup subgroup with three different member links and use the backup subgroup to provide link protection for the primary subgroup.
Use LACP Link Protection (1:1) to confirm platform and release support for specific features.
To configure link protection using subgroups:
The LACP decides active and back up state of links. When configuring LACP, the state of the backup link should not be configured manually as down. The following command is not supported if LACP is configured:set interfaces ae0 aggregated-ether-options link-protection backup-state down
Configure LACP Hold-UP Timer to Prevent Link Flapping on LAG Interfaces
On link aggregation group (LAG) interfaces, when a member (child) link goes down, its state changes from current to expired. This link might flap from the current state to the expired state and back to current state when it receives intermittent LACP protocol data units (PDUs) and keepalive timeouts. Such flapping can adversely affect the traffic on the link.
To prevent excessive flapping of a LAG child link, you can configure a hold-up timer on the LAG interface that is applicable to all member links on that particular interface. To hold up, in networking terms, means to prevent the transitioning of an interface from down to up for a specified time interval.
When configured, the hold-up timer is triggered when an LACP state machine tries to move to the current state from the expired or default state when it receives an LACP PDU. The hold-up timer is triggered only if the LACP state machine had acquired the current state at least once earlier. The timer is not triggered if LACP attempts to transition to the current state for the first time. LACP monitors the PDUs received on the child link but prevents the link from transitioning to current state. If no flapping is observed when the link receives the PDUs, the hold-up timer expiries and triggers the member link to transition back to the current state. This transition is triggered as soon as the hold-up timer expires and not necessarily when the link receives a PDU.
To configure LACP hold-up timer for LAG interface, use the hold-time up statement at the [edit interfaces aex aggregated-ether-options
lacp] hierarchy level.
The hold-up timer keeps running even when the interface that receives the LACP PDU moves to the port disable state. The timer is then restarted if, before the timer expires, the interface comes up again and receives an LACP PDU from its neighbor. This ensures that the timer is maintained even during a quick physical port flap.
When the following events occur, a hold-up timer is not triggered until the member link acquires the current state after the event:
LACP daemon restart
Deactivation and reactivation of child or aggregated Ethernet interface
Deletion and reconfiguration of child or aggregated Ethernet interface
System reboot
Routing Engine switchover
Example: Configure Aggregated Ethernet High-Speed Uplinks with LACP Between an EX4200 Virtual Chassis Access Switch and an EX4200 Virtual Chassis Distribution Switch
EX Series switches allow you to combine multiple Ethernet links into one logical interface for higher bandwidth and redundancy. The ports that are combined in this manner are referred to as a link aggregation group (LAG) or bundle. EX Series switches allow you to further enhance these links by configuring Link Aggregation Control Protocol (LACP).
- Requirements
- Overview and Topology
- Configure LACP for the LAGs on the Virtual Chassis Access Switch
- Configure LACP for the LAGs on the Virtual Chassis Distribution Switch
- Verification
- Troubleshoot
Requirements
This example uses the following software and hardware components:
Junos OS Release 9.0 or later for EX Series switches
Two EX4200-48P switches
Two EX4200-24F switches
Four EX Series XFP uplink modules
Before you configure LACP, be sure you have:
Set up the Virtual Chassis switches. See Configuring an EX4200, EX4500, or EX4550 Virtual Chassis (CLI Procedure).
Configured the uplink ports on the switches as trunk ports. See Configuring Gigabit Ethernet Interfaces (CLI Procedure).
Configured the LAGs.
Overview and Topology
The topology in this example is exactly the same as the topology in that other example. This example shows how to use LACP to enhance the LAG functionality.
LACP exchanges are made between actors (the transmitting link) and partners (the receiving link). The LACP mode can be either active or passive.
If the actor and partner are both in passive mode, they do not exchange LACP packets, which results in the aggregated Ethernet links not coming up. By default, LACP is in passive mode. To initiate transmission of LACP packets and responses to LACP packets, you must enable LACP in active mode.
By default, the actor and partner send LACP packets every second.
The interval can be fast (every second) or slow (every 30 seconds).
Configure LACP for the LAGs on the Virtual Chassis Access Switch
To configure LACP for the access switch LAGs, perform these tasks.
Procedure
CLI Quick Configuration
To quickly configure LACP for the access switch LAGs, copy the following commands and paste them into the switch terminal window:
[edit]
set interfaces ae0 aggregated-ether-options lacp active periodic fast
set interfaces ae1 aggregated-ether-options lacp active periodic fast Step-by-Step Procedure
To configure LACP for Host-A LAGs ae0
and ae1:
Specify the aggregated Ethernet options for both bundles:
[edit interfaces] user@Host-A#set ae0 aggregated-ether-options lacp active periodic fast user@Host-A#set ae1 aggregated-ether-options lacp active periodic fast
Results
Display the results of the configuration:
[edit interfaces]
user@Host-A# show
ae0 {
aggregated-ether-options {
lacp {
active;
periodic fast;
}
}
}
ae1 {
aggregated-ether-options {
lacp {
active;
periodic fast;
}
}
}
Configure LACP for the LAGs on the Virtual Chassis Distribution Switch
To configure LACP for the two uplink LAGs from the Virtual Chassis access switch to the Virtual Chassis distribution switch, perform these tasks.
Procedure
CLI Quick Configuration
To quickly configure LACP for the distribution switch LAGs, copy the following commands and paste them into the switch terminal window:
[edit interfaces]
set ae0 aggregated-ether-options lacp passive periodic fast
set ae1 aggregated-ether-options lacp passive periodic fast Step-by-Step Procedure
To configure LACP for Host D LAGs ae0
and ae1:
Specify the aggregated Ethernet options for both bundles:
[edit interfaces] user@Host-D#set ae0 aggregated-ether-options lacp passive periodic fast user@Host-D#set ae1 aggregated-ether-options lacp passive periodic fast
Results
Display the results of the configuration:
[edit interfaces]
user@Host-D# show
ae0 {
aggregated-ether-options {
lacp {
passive;
periodic fast;
}
}
}
ae1 {
aggregated-ether-options {
lacp {
passive
periodic fast;
}
}
}
Verification
To verify that LACP packets are being exchanged, perform these tasks:
Verify the LACP Settings
Purpose
Verify that LACP has been set up correctly.
Action
Use the show lacp interfaces interface-name command to check that LACP has been enabled as active on one
end.
user@Host-A> show lacp interfaces xe-0/1/0
Aggregated interface: ae0
LACP state: Role Exp Def Dist Col Syn Aggr Timeout Activity
xe-0/1/0 Actor No Yes No No No Yes Fast Active
xe-0/1/0 Partner No Yes No No No Yes Fast Passive
LACP protocol: Receive State Transmit State Mux State
xe-0/1/0 Defaulted Fast periodic Detached
Meaning
The output indicates that LACP has been set up correctly and is active at one end.
Verify That the LACP Packets Are Being Exchanged
Purpose
Verify that LACP packets are being exchanged.
Action
Use the show interfaces aex statistics command to display LACP information.
user@Host-A> show interfaces ae0 statistics
Physical interface: ae0, Enabled, Physical link is Down
Interface index: 153, SNMP ifIndex: 30
Link-level type: Ethernet, MTU: 1514, Speed: Unspecified, Loopback: Disabled,
Source filtering: Disabled, Flow control: Disabled, Minimum links needed: 1,
Minimum bandwidth needed: 0
Device flags : Present Running
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Current address: 02:19:e2:50:45:e0, Hardware address: 02:19:e2:50:45:e0
Last flapped : Never
Statistics last cleared: Never
Input packets : 0
Output packets: 0
Input errors: 0, Output errors: 0
Logical interface ae0.0 (Index 71) (SNMP ifIndex 34)
Flags: Hardware-Down Device-Down SNMP-Traps Encapsulation: ENET2
Statistics Packets pps Bytes bps
Bundle:
Input : 0 0 0 0
Output: 0 0 0 0
Protocol inet
Flags: None
Addresses, Flags: Dest-route-down Is-Preferred Is-Primary
Destination: 10.10.10/24, Local: 10.10.10.1, Broadcast: 10.10.10.255
Meaning
The output here shows that the link is down and that no protocol data units (PDUs) are being exchanged.
Troubleshoot
To troubleshoot a nonworking LACP link, perform these tasks:
Troubleshoot a Nonworking LACP Link
Problem
The LACP link is not working.
Solution
Check the following:
Remove the LACP configuration and verify whether the static LAG is up.
Verify that LACP is configured at both ends.
Verify that LACP is not passive at both ends.
Verify whether LACP protocol data units (PDUs) are being exchanged by running the
monitor traffic-interface lag-member detailcommand.
Example: Configure Link Aggregation with LACP Between a QFX Series Switches Product and an Aggregation Switch
QFX Series Switches products allow you to combine multiple Ethernet links into one logical interface for higher bandwidth and redundancy. The ports that are combined in this manner are referred to as a LAG or bundle. The number of Ethernet links you can combine into a LAG depends on your QFX Series Switches product model. On a standalone switch, you can group up to 32 Ethernet interfaces to form a LAG. On a QFabric system, you can group up to 8 Ethernet interfaces to form a LAG. QFX Series Switches products allow you to further enhance these links by configuring LACP.
- Requirements
- Overview and Topology
- Configure LACP for the LAG on the QFX Series Switches
- Verification
- Troubleshoot
Requirements
This example uses the following software and hardware components:
Junos OS Release 11.1 or later for the QFX3500 switch, Junos OS Release 12.1 or later for the QFX3600 switch, Junos OS Release 13.2 or later for the QFX5100 switch, and Junos OS Release 15.1X53-D10 or later for the QFX10002 switch.
One QFX3500, QFX3600, QFX5100, QFX10002 switch.
Before you configure LACP, be sure you have:
Configured the ports on the switches as trunk ports.
Configured the LAG.
Overview and Topology
This example shows how to use LACP to enhance the LAG functionality.
LACP exchanges are made between actors (the transmitting link) and partners (the receiving link). The LACP mode can be either active or passive.
If the actor and partner are both in passive mode, they do not exchange LACP packets, which results in the aggregated Ethernet links not coming up. By default, LACP is in passive mode. To initiate transmission of LACP packets and responses to LACP packets, you must enable LACP in active mode.
By default, the actor and partner send LACP packets every second.
You can configure the interval at which the interfaces send LACP packets
by including the periodic statement at the [edit interfaces interface-name aggregated-ether-options lacp] hierarchy
level.
The interval can be fast (every second) or slow (every 30 seconds).
Configure LACP for the LAG on the QFX Series Switches
To configure LACP for a QFX Series Switches LAG, perform these tasks.
Procedure
CLI Quick Configuration
To quickly configure LACP for the access switch LAGs, copy the following commands and paste into the switch terminal window:
[edit] set interfaces ae0 aggregated-ether-options lacp active periodic fast
Step-by-Step Procedure
To configure LACP for LAG
ae0:
Specify the aggregated Ethernet options for the LAG:
[edit interfaces] user@switch# set ae0 aggregated-ether-options lacp active periodic fast
Results
Display the results of the configuration:
[edit interfaces]
user@switch# show
ae0 {
aggregated-ether-options {
lacp {
active;
periodic fast;
}
}
}
Verification
To verify that LACP packets are being exchanged, perform the following tasks:
Verify the LACP Settings
Purpose
Verify that LACP has been set up correctly.
Action
Use the show lacp interfaces interface-name command to check that LACP has been enabled as active on one
end.
user@switch> show lacp interfaces xe-0/02
Aggregated interface: ae0
LACP state: Role Exp Def Dist Col Syn Aggr Timeout Activity
xe-0/0/2 Actor No Yes No No No Yes Fast Active
xe-0/0/2 Partner No Yes No No No Yes Fast Passive
LACP protocol: Receive State Transmit State Mux State
xe-0/0/2 Defaulted Fast periodic Detached
Meaning
The output indicates that LACP has been set up correctly and is active at one end.
Verify That the LACP Packets Are Being Exchanged
Purpose
Verify that LACP packets are being exchanged.
Action
Use the show interfaces aex statistics command to display LACP information.
user@switch> show interfaces ae0 statistics
Physical interface: ae0, Enabled, Physical link is Down
Interface index: 153, SNMP ifIndex: 30
Link-level type: Ethernet, MTU: 1514, Speed: Unspecified, Loopback: Disabled,
Source filtering: Disabled, Flow control: Disabled, Minimum links needed: 1,
Minimum bandwidth needed: 0
Device flags : Present Running
Interface flags: Hardware-Down SNMP-Traps Internal: 0x0
Current address: 02:19:e2:50:45:e0, Hardware address: 02:19:e2:50:45:e0
Last flapped : Never
Statistics last cleared: Never
Input packets : 0
Output packets: 0
Input errors: 0, Output errors: 0
Logical interface ae0.0 (Index 71) (SNMP ifIndex 34)
Flags: Hardware-Down Device-Down SNMP-Traps Encapsulation: ENET2
Statistics Packets pps Bytes bps
Bundle:
Input : 0 0 0 0
Output: 0 0 0 0
Protocol inet
Flags: None
Addresses, Flags: Dest-route-down Is-Preferred Is-Primary
Destination: 10.10.10/8, Local: 10.10.10.1, Broadcast: 10.10.10.255
Meaning
The output here shows that the link is down and that no PDUs are being exchanged.
Troubleshoot
To troubleshoot a non-working LACP link, perform these tasks:
Troubleshoot a Nonworking LACP Link
Problem
The LACP link is not working.
Solution
Check the following:
Remove the LACP configuration and verify whether the static LAG is up.
Verify that LACP is configured at both ends.
Verify that LACP is not passive at both ends.
Verify whether LACP PDUs are being exchanged by running the
monitor traffic-interface lag-member detailcommand.