Multi Chassis Link Aggregation (MC-LAG) on UniFi Switches
MC-LAG (Multi-Chassis Link Aggregation Group) enables load balancing and redundancy for large networks by connecting two switches as an MC-LAG pair. This setup allows other switches and servers supporting LAG (Link Aggregation) to connect to both MC-LAG switches simultaneously, ensuring minimal downtime during failures and increased throughput by combining multiple links.
This guide provides a simple introduction to configuring an MC-LAG setup with two links between two MC-LAG switches and one downstream server or UniFi switch. It covers setting up an MC-LAG switch pair and adding your first target device, including the new EFG target device option.
Requirements
- Switches: 2 ECS-Aggregation switches in an MC-LAG pair and one downstream target device (connected to both ECS-Aggregation switches)
Configure MC-LAG in UniFi Network
- Directly connect the two ECS-Aggregation switches that will be configured as MC-LAG peers by using one cable.
- This will function as the Multi-Chassis Link between the two switches in the MC-LAG pair, ensuring fast data transfer and redundancy.
- Using the 100GbE ports (49 through 54) is optimal, but not mandatory.
- Open the UniFi Network Application and navigate to Port Manager > MC-LAG.
- If another MC-LAG setup has already been configured in this console, press Create New.
- Name the MC-LAG group (e.g., "Core Group").
- Select the two ECS-Aggregation switches that will form the MC-LAG pair as the Top Switch and Bottom Switch.
- Click Set Up next to Multi-Chassis Link and select the port connected in Step 1 and the next consecutive port(s) on both the top and bottom switches.
- For example create a Multi-Chassis Link by using two ports (49 and 50) on both switches.
- Click Save.
- To finalize the MC-LAG configuration, connect the Top Switch and Bottom Switch by plugging in the other ports configured in Step 6.
- To avoid network instability, the other ports are only connected after the Multi-Chassis Link is configured.
Configure a Target Device for Your MC-LAG Setup
Follow the steps below based on the type of target device you're configuring:
- Ensure the two ECS-Aggregation switches have been successfully configured for MC-LAG.
- Connect only one cable from the target device to the top ECS switch to avoid network instability.
- Configure the target device:
-
UniFi Switch:
- Open Port Manager in UniFi Network.
- Select the target switch and choose the leftmost port to be aggregated.
- Under Manual Settings, set Operation to Aggregating.
- Select the additional ports you wish to aggregate.
-
3rd-Party Switches or Servers:
- Set up Port Aggregation (LACP) on the device and aggregate the ports that will connect to the MC-LAG pair. Refer to the vendor's documentation if needed.
-
UniFi Switch:
- In UniFi Network, navigate to Port Manager > MC-LAG and select the MC-LAG pair.
- Click Configure next to Target Devices Membership (or Add if another target device has been configured).
- Select the ports on each switch in the MC-LAG pair that will connect to the target device.
- Click Save.
- Connect the target device to the two ECS-Aggregation switches using the ports configured in the previous steps.
UniFi Gateway Shadow Mode High Availability with MC-LAG
ECS-Aggregation switches configured for MC-LAG ensure high availability of your UniFi Cloud Gateways, minimizing downtime and providing reliable failover in case of hardware failures. In this setup, both the Primary and Shadow Gateway connect to each ECS-Aggregation switch in the MC-LAG pair, ensuring uninterrupted internet access.
Current Limitations:
- UniFi Cloud Gateway devices do not currently support LAG, and cannot be used as Target Devices for MC-LAG.
- STP will block a connection between the Primary Gateway and one of the ECS-Aggregation switches.
- Failover to the ECS-Aggregation switch blocked by STP may take up to 10 seconds.
For more details on Shadow Mode, refer to the help article.
Considerations for Upstream Target Devices
If switch target devices are upstream of the MC-LAG pair, then Target Devices Membership on the MC-LAG pair should be configured prior to configuring Port Aggregation on the switch using the Port Manager. For these cases, follow the steps in the "Configure a Target Device for Your MC-LAG Setup" above but perform Step 4 before Step 2.
Additional Notes
- You can also create MC-LAG groups for pairs of downstream switches to enable both load balancing and redundancy.
- Physically connect Target Devices before configuring their ports as Target Devices on the ECS-Aggregation switches. Ports configured in MC-LAG cannot discover new devices.