Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

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:

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.

Note:

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:

  1. Enable the LACP mode:

    For example, to specify the mode as active, execute the following command:

    Note:

    LACP decides active and back up state of links. When configuring LACP, 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

  2. Specify the interval and speed at which the interfaces send LACP packets:

    For example, to specify the interval as fast, execute the following command:

  3. (Optional) A link without Link Access Control Protocol (LACP) configuration remains down and cannot be accessed by the provider edge (PE) devices in the topology. Configure the force-up feature in LACP on a PE device for which you need connectivity. You can configure force-up in two ways:
    1. [edit interfaces] user@switch# set interfaces aex aggregated-ether-options lacp force-up
    2. [edit interfaces] user@switch# set interfaces aex ether-options 802.3ad lacp force-up

    By default, only one link of a LAG can be in the force-up state at any time.

    In a standalone or a virtual chassis environment configured with aggregated Ethernet (AE):

    • When an AE on a switch has multiple member links and one is in force-up state with its peer's LACP down, force-up is disabled if LACP partially comes up with a non-force-up member link. The member link is then ready for connection establishment through LACP. Force-up is eligible only if the server-side interface has LACP issues.

  4. Verify the LACP setup using the show commands given below. The LACP process exists in the system only if you configure the system in either active or passive LACP mode.
    • To verify that LACP has been setup correctly and enabled as active on one end:

      This example shows that LACP has been configured with one side as active and the other as passive. When LACP is enabled, one side must be set as active in order for the bundled link to be up.
    • To verify that the LACP packets are being exchanged between interfaces. Use the show lacp statistics interfaces interface-name command to display LACP BPDU exchange information.

    The output here shows that the link is up and that PDUs are being exchanged.

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.

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.

Note:

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:

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

To configure LACP link protection for aggregated Ethernet interfaces at the global level:

  1. Enable LACP link protection on the switch:
  2. (Optional) Configure the LACP link protection for the aggregated Ethernet interfaces to be in nonrevertive mode:
    Note:

    LACP link protection is in revertive mode by default.

  3. (Optional)To configure LACP system priority for the aggregated Ethernet interfaces:

Configure LACP Link Protection for a Single Link at the Aggregated Interface Level

To enable LACP link protection for a specific aggregated Ethernet interface:

  1. Enable LACP link protection for the interface:
  2. (Optional) Configure the LACP link protection for the aggregated Ethernet interface to be in revertive or nonrevertive mode:
    • To specify revertive mode:

    • To specify nonrevertive mode:

  3. (Optional)To configure LACP system priority for an aggregated Ethernet interface:
  4. (Optional) To configure LACP port priority for an 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:

  1. Configure the primary link protection subgroup in the aggregated ethernet interface:

    For instance, to create a primary link protection subgroup named subgroup-primary for interface ae0:

  2. Configure the backup link protection subgroup in the aggregated ethernet interface:

    For instance, to create a backup link protection subgroup named subgroup-backup for interface ae0:

    Note:

    You can create one primary and one backup link protection subgroup per aggregated ethernet interface.

  3. Attach interfaces to the link protection subgroups:
    Note:

    The primary and backup link protection subgroups must contain the same number of interfaces. For instance, if the primary link protection subgroup contains three interfaces, the backup link protection subgroup must also contain three interfaces.

    For instance, to configure interfaces ge-0/0/0 and ge-0/0/1 into link protection subgroup subgroup-primary and interfaces ge-0/0/2 and ge-0/0/3 into link protection subgroup subgroup-backup:

  4. (Optional) Configure the port priority for link protection:

    The port priority is used to select the active link.

  5. Enable link protection

    To enable link protection at the LAG level:

    To enable link protection at the LACP level:

    For instance, to enable link protection on ae0 at the LAG level:

    For instance, to enable link protection on ae0 at the LACP level:

Note:

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.

Note:
  • 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