Configure Link Aggregation Using LACP
Complete guide to configuring Link Aggregation Control Protocol (LACP) for Ethernet channel bonding and redundant switch uplinks.
# Configure Link Aggregation Using LACP
Introduction
Link Aggregation Control Protocol (LACP), defined in IEEE 802.3AD, enables bundling multiple physical Ethernet links into a single logical link for increased bandwidth, redundancy, and load distribution. LACP is vendor-neutral and widely supported across enterprise switching platforms from Cisco, Juniper, Arista, Dell, HP, and Linux servers.
This tutorial covers LACP theory, configuration, verification, and troubleshooting for switch-to-switch uplinks, switch-to-server connections, and Linux bonding. You will learn how to create LACP port channels, select appropriate load-balancing algorithms, verify bundle operation, and recover from link failures.
By the end of this guide, you will be able to design and deploy LACP aggregations that provide resilient, high-bandwidth connectivity across your enterprise network.
Technical Background
LACP Fundamentals
LACP allows switches to dynamically negotiate link aggregation. Each port in an LACP group exchanges LACPDUs (Link Aggregation Control Protocol Data Units) containing:
- System priority and MAC address
- Port priority and port number
- Key (aggregation identifier)
- Activity state (active/passive)
- Timeout (short/long)
Ports with matching keys and compatible system parameters aggregate into the same port channel. LACP operates in two modes:
- **Active**: Sends LACPDUs unconditionally; initiates aggregation.
- **Passive**: Responds to LACPDUs but does not initiate; waits for the partner to start.
At least one side must be active for aggregation to form. Active-active is recommended for deterministic behavior.
Link Aggregation vs. Other Technologies
| Technology | Standard | Vendor | Typical Use Case | |------------|----------|--------|------------------| | LACP | IEEE 802.3AD | Multi-vendor | Switch-switch, switch-server, server-server | | PAgP | Cisco proprietary | Cisco | Cisco-only environments | | Static | Manual | Multi-vendor | When LACP negotiation not supported | | Linux bonding | kernel bonding | Linux | Server NIC teaming |
Load Balancing
Traffic across aggregated links is distributed using a hash based on frame headers. Common hash inputs:
- Source MAC
- Destination MAC
- Source IP and destination IP
- Source/destination TCP/UDP ports
Important: A single conversation (same source/destination pair) always uses the same physical link. Aggregation does not increase the speed of a single flow; it increases aggregate capacity across many flows.
Prerequisites
- Switches supporting IEEE 802.3AD LACP
- Matching speed and duplex on all member links
- Same VLAN configuration on all member ports
- Maintenance window (port-channel creation may briefly flap interfaces)
- Understanding of spanning-tree implications
Architecture
Switch-to-Switch LACP Uplink
Distribution-A Distribution-B
┌─────────────┐ ┌─────────────┐
│ Po1 (LACP) │ │ Po1 (LACP) │
│ Gi1/0/1 ├───────────────┤ Gi1/0/1 │
│ Gi1/0/2 ├───────────────┤ Gi1/0/2 │
│ Gi1/0/3 ├───────────────┤ Gi1/0/3 │
│ Gi1/0/4 ├───────────────┤ Gi1/0/4 │
└─────────────┘ └─────────────┘
4 × 10GbE = 40GbE aggregatedgraph LR
subgraph SW_A
A1[Gi1/0/1]
A2[Gi1/0/2]
A3[Gi1/0/3]
A4[Gi1/0/4]
end
subgraph SW_B
B1[Gi1/0/1]
B2[Gi1/0/2]
B3[Gi1/0/3]
B4[Gi1/0/4]
end
subgraph Po1_A [Port-Channel 1 LACP]
end
subgraph Po1_B [Port-Channel 1 LACP]
end
A1 --> Po1_A
A2 --> Po1_A
A3 --> Po1_A
A4 --> Po1_A
Po1_A == LACP == Po1_B
B1 --> Po1_B
B2 --> Po1_B
B3 --> Po1_B
B4 --> Po1_BSwitch-to-Server LACP (Linux Bonding)
Access Switch Linux Server
┌─────────────┐ ┌─────────────────┐
│ Po10 (LACP) │ │ bond0 (802.3ad) │
│ Gi1/0/1 ├─────────┤ eth0 │
│ Gi1/0/2 ├─────────┤ eth1 │
└─────────────┘ └─────────────────┘Step-by-Step Implementation
Step 1: Configure LACP on Cisco Switch (Distribution-A)
**Purpose**: Create a port-channel with four 10GbE member links using active LACP.
**Commands**:
configure terminal
!
interface Port-Channel1
description LACP-Uplink-to-Dist-B
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
switchport trunk native vlan 999
spanning-tree portfast trunk
no shutdown
exit
!
interface range GigabitEthernet1/0/1-4
channel-group 1 mode active
channel-protocol lacp
exit
!
end
copy running-config startup-config**Configuration files**: Port-channel and member interface configurations in running-config.
**Explanation**: `channel-group 1 mode active` assigns physical interfaces to port-channel 1 using active LACP. All member ports must have identical speed, duplex, and VLAN settings.
**Expected output**: Port-channel 1 becomes active when the remote side also configures LACP.
**Verification**:
show etherchannel summary
show interfaces port-channel 1
show lacp neighborStep 2: Configure LACP on Cisco Switch (Distribution-B)
**Purpose**: Configure matching LACP port-channel on the peer switch.
**Commands**:
configure terminal
!
interface Port-Channel1
description LACP-Uplink-to-Dist-A
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40
switchport trunk native vlan 999
spanning-tree portfast trunk
no shutdown
exit
!
interface range GigabitEthernet1/0/1-4
channel-group 1 mode active
channel-protocol lacp
exit
!
end
copy running-config startup-config**Expected output**: LACP negotiations complete; port-channel bundles four active links.
**Verification**:
show etherchannel summary
show lacp neighborStep 3: Configure LACP Load Balancing
**Purpose**: Optimize traffic distribution across aggregated links.
**Commands** (global, affects all port-channels):
configure terminal
port-channel load-balance src-dst-ip
end**Options**:
- `src-dst-mac`: Hash on source and destination MAC (good for Layer 2)
- `src-dst-ip`: Hash on source and destination IP (good for routed traffic)
- `src-dst-ip-port`: Hash on IP and TCP/UDP ports (most granular)
**Explanation**: Change load balancing only during a maintenance window; changing the algorithm causes re-hashing and brief traffic disruption.
**Verification**:
show etherchannel load-balanceStep 4: Configure Linux Server Bonding (802.3ad)
**Purpose**: Bond two server NICs into a single logical interface using LACP.
**Configuration** (`/etc/network/interfaces` for Debian/Ubuntu):
auto bond0
iface bond0 inet static
address 10.1.30.10/24
gateway 10.1.30.1
bond-slaves eth0 eth1
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate fast
bond-xmit_hash_policy layer2+3Or using NetworkManager (`nmcli`):
nmcli connection add type bond con-name bond0 ifname bond0 bond.mode 802.3ad
nmcli connection add type ethernet con-name eth0 ifname eth0 master bond0 slave-type bond
nmcli connection add type ethernet con-name eth1 ifname eth1 master bond0 slave-type bond
nmcli connection modify bond0 ipv4.addresses 10.1.30.10/24 ipv4.gateway 10.1.30.1 ipv4.method manual
nmcli connection up bond0**Explanation**: `bond-miimon 100` monitors link status every 100ms. `bond-lacp-rate fast` requests LACPDUs every second instead of every 30 seconds for faster failover.
**Verification**:
cat /proc/net/bonding/bond0
ip addr show bond0Configuration Examples
Cisco EtherChannel with LACP (Full Fragment)
!
interface Port-Channel10
description Uplink-to-Core-Switches
switchport mode trunk
switchport trunk allowed vlan 10,20,30,40,50,60
switchport trunk native vlan 999
no shutdown
!
interface GigabitEthernet1/0/1
description Uplink-to-Core-A-1
channel-group 10 mode active
no shutdown
!
interface GigabitEthernet1/0/2
description Uplink-to-Core-A-2
channel-group 10 mode active
no shutdown
!
interface GigabitEthernet1/0/3
description Uplink-to-Core-B-1
channel-group 10 mode active
no shutdown
!
interface GigabitEthernet1/0/4
description Uplink-to-Core-B-2
channel-group 10 mode active
no shutdownJuniper LACP Aggregated Ethernet
set interfaces ae0 aggregated-ether-options lacp active
set interfaces ae0 aggregated-ether-options link-speed 10g
set interfaces ae0 unit 0 family ethernet-switching vlan members [10 20 30 40]
set interfaces ge-0/0/1 gigether-options 802.3ad ae0
set interfaces ge-0/0/2 gigether-options 802.3ad ae0Linux Bonding with systemd-networkd
[Match]
Name=enp3s0f0
[Network]
Bond=bond0
---
[Match]
Name=enp3s0f1
[Network]
Bond=bond0
---
[Match]
Name=bond0
[Network]
Address=10.1.30.10/24
Gateway=10.1.30.1
[Bond]
Mode=802.3ad
LACPTransmitRate=fast
Miimon=100Verification
Cisco Switch Verification
show etherchannel summary -- Number of ports in bundle
show interfaces port-channel 1 -- Port-channel status
show lacp neighbor -- LACP partner details
show lacp internal -- Local LACP configuration
show lacp counters -- LACPDU statistics
show interfaces Gi1/0/1 switchport -- Member port VLAN configExpected Cisco Output
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
M - not in use, minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) LACP Gi1/0/1(P) Gi1/0/2(P) Gi1/0/3(P) Gi1/0/4(P)`SU` = Port-channel is up and in use. `(P)` = member port bundled in port-channel.
Linux Verification
cat /proc/net/bonding/bond0Expected output shows `Bonding Mode: IEEE 802.3ad Dynamic link aggregation`, active slaves, and LACP partner information.
ip -s link show bond0Shows packet and byte counters across the bonded interface.
Troubleshooting
| Symptom | Possible Cause | Diagnostic Command | Corrective Action | Verification | |---------|---------------|-------------------|-------------------|--------------| | Port-channel shows suspended | LACP mismatch (active/passive both sides) | `show lacp neighbor` | Set one side to `mode active` | LACP negotiates, ports bundle | | Member port shows individual | Spanning-tree blocking | `show spanning-tree` | Enable portfast trunk or adjust STP | Port forwards traffic | | LACP not negotiating | `switchport nonegotiate` missing or DTP conflict | `show dtp interface` | Configure static `mode active` | LACPDUs exchanged | | Uneven traffic distribution | Poor load-balancing hash | `show etherchannel load-balance` | Change hash algorithm to `src-dst-ip-port` | Balanced link utilization | | Link flap on port-channel creation | Member ports briefly down | `show logging` | Perform during maintenance window | Stable after configuration | | One link not bundling | Speed/duplex mismatch | `show interfaces Gi1/0/1` | Match speed/duplex on both ends | Port joins port-channel | | VLAN mismatch on members | Different allowed VLANs | `show interfaces switchport` | Align allowed VLANs on all members | Traffic passes for all VLANs | | Server bond shows one active | Switch port not LACP | `cat /proc/net/bonding/bond0` | Configure switch port-channel with LACP | Both slaves active | | Slow failover (>30s) | LACP long timeout | `bond-lacp-rate fast` | Set short LACP timeout on switch | Sub-second failover | | Port-channel down after reload | `no shutdown` missing | `show interfaces port-channel` | Add `no shutdown` to port-channel | Interface up/up |
Best Practices
1. **Use active LACP on both sides**: Avoid passive-passive combinations that never form an aggregation. 2. **Match all member port settings**: Speed, duplex, MTU, VLANs, and STP settings must be identical across all ports in a channel. 3. **Use `switchport nonegotiate` on trunks**: Prevents DTP negotiation issues when connecting to non-Cisco devices. 4. **Configure minimum links**: Use `port-channel min-links` to ensure the channel stays up only when sufficient bandwidth is available. 5. **Select appropriate load balancing**: Use `src-dst-ip` for routed environments and `src-dst-mac` for pure Layer 2 environments. 6. **Enable LACP fast rate**: Use short LACP timeouts for faster failure detection on critical links. 7. **Monitor port-channel utilization**: Alert when aggregate utilization exceeds 70% to plan for capacity upgrades. 8. **Test single-link failure**: Physically disconnect one member link and verify traffic continues without interruption. 9. **Document port-channel assignments**: Record which physical ports belong to which port-channel and their purpose. 10. **Avoid mixing port speeds**: Do not combine 1GbE and 10GbE ports in the same LACP group; behavior is unpredictable.
Conclusion
LACP provides a standards-based method for aggregating Ethernet links into resilient, high-bandwidth logical interfaces. Whether connecting switches in the core, distribution, or access layers, or bonding server NICs for redundant connectivity, LACP delivers load distribution and automatic failover. Success depends on consistent configuration, appropriate load-balancing selection, and thorough verification after deployment. Use the commands and examples in this guide as a reference for your LACP implementations.
References
- IEEE 802.3AD-2002 - Aggregation of Multiple Link Segments (https://ieeexplore.ieee.org/)
- Cisco EtherChannel Configuration Guide (https://www.cisco.com/c/en/us/support/docs/switches/catalyst-3750-series-switches/)
- Juniper Aggregated Ethernet Interfaces (https://www.juniper.net/documentation/)
- Linux kernel bonding documentation (https://www.kernel.org/doc/Documentation/networking/bonding.rst)
- Arista Link Aggregation Configuration (https://www.arista.com/)
- Red Hat Enterprise Linux Networking Guide (https://access.redhat.com/)