UniFi - USW: Configuring Link Aggregation Groups (LAG)


Overview


After reviewing this article readers should expect to know how to configure link aggregation on the UniFi Switch devices. This article also includes considerations that should be taken into thought when configuring a link aggregation group. 

NOTES & REQUIREMENTS:
Devices used in this article:
  • All UniFi Switch models apply. 

Table of Contents


  1. Introduction
  2. Network Diagram
  3. Steps: How to Configure Link Aggregation Groups
    1. Key Considerations
  4. Verification
  5. Related Articles

Introduction


Back to Top

Configuring the UniFi switches with a link aggregation group (LAG) allows a UniFi Administrator to be able to expand the maximum throughput on a network path. 

Link Aggregation Control Protocol (LACP)

LACP is a dynamically negotiated protocol that ensures that the LAG configuration is compatible and viable on each endpoint. LACP also provides the ability for the load balancing to failover in the event that one of the bundled links were to fail. 


Network Diagram


Back to Top

LACP_XG.png


Steps: How to Configure Link Aggregation Groups


Back to Top

  1. Navigate to the switches that will participate in the link aggregation group. 
  2. Select Profile Overrides.
  3. Under the Aggregate Ports section select which ports to include in the LAG. 

ATTENTION:
  • Take note of the warning about order of operations when enabling the link aggregation group.  
  • Both LAGs on the connecting devices must have the same port profile. Port numbers do not have to match. 

Key Considerations

Limitations

  • Up to four ports may be configured in the LAG. These ports must be sequential in number.
  • Up to five individual LAGs can be configured. 
  • Static LAG configurations are not supported. LACP (802.3ad) only. 
  • No Multi-chassis Link Aggregation Group (MLAG). 

Spanning Tree Protocol (STP)

When defining a LAG it is important to understand that the STP port cost is divided by however many active links are participating in the LAG. 

Example:

 Number of Ports LAG STP Port Cost
4x 1Gbps ports (20,000 original port cost) 5,000
2x 10Gbps ports (2,000 original port cost) 1,000 

A LAG may alter the best path based on the port cost to the root bridge. Be certain that an administratively-defined root bridge is selected. 

Order of Operations

When enabling link aggregation between UniFi switches it is important to retain access to the controller for provisioning to take place. When enabling the LAG on the devices be certain that configuration changes are first done on the downstream switch, and then on the upstream switch. 

NOTE: The terms "upstream" and "downstream" are used relationally in accordance with the path to the controller host. 

LACP Algorithm

  • Hashing based on Source/Destination MAC, VLAN, EtherType, and incoming port associated with the packet

Throughput

Throughput testing with one host to another single host will not show improvements. The hashing algorithm that is used for LACP does not split data streams on single host-to-host connections. To see improvements in throughput multiple hosts would have to be passing traffic at the same time. 


Verification


Back to Top

CLI: Access the command line interface (CLI). You can do this using the debug terminal in the GUI or by using a program such as PuTTY.
  • View counters on LAG:

show interface lag #

  • View LACP partners on all ports:

show lacp partner all


Related Articles


Back to Top

UniFi - USW: Configuring Spanning Tree Protocol