Configuring MC-LAG in UniFi Network
Multi-Chassis Link Aggregation Group (MC-LAG) enables redundancy and load balancing by connecting two ECS-Aggregation switches as an MC-LAG pair. This setup ensures minimal downtime and increased throughput by aggregating multiple links.
When configuring MC-LAG, it is important to properly configure both upstream and downstream devices to take advantage of the multi-chassis link, enabling load balancing and seamless failover redundancy.
MC-LAG is just one component of UniFi’s full-stack high availability and redundancy solution. For more information, see our High Availability Overview.
Upstream Connections
Upstream devices include Enterprise Fortress Gateways (EFG) which is specially designed for MC-LAG, as well as other Cloud Gateways and pre-established MC-LAG switches. The setup differs depending on whether the device is in Shadow Mode or a Single Unit.
EFG (w/ Shadow Mode Already Configured)
-
Ensure EFG Port 5 and Port 6 are configured as LAN ports:
- Navigate to UniFi Network > Settings > Internet.
- Select WAN 2.
- If it is being used, ensure WAN2 is set to either 3 or 4. Otherwise, disable it.
-
Prepare initial physical connections:
- Choose one of the two ECS Aggregation switches – this will be designated as Top Switch. The other will be your Bottom Switch (this distinction will be important later on).
- Connect Port 5 of the Primary EFG to Port 1 of your Top Switch.
- Choose at least two numerically consecutive ports on your Top Switch – these will be designated as the Multi-Chassis Links. Reserve the exact same ports on your Bottom Switch for later.
- We recommend using a 100G link for this, available in ports 49-54.
- Connect your Bottom Switch to the Top Switch using the lowest numbered link port chosen in the previous step.
- Do not connect the others - they will be connected later in the setup process.
-
Adopt your ECS switches:
- For more information, go here.
-
Configure MC-LAG in UniFi Network:
- Within UniFi Network, navigate to Port Manager > MC-LAG and click Create New.
- Assign a Name to the MC-LAG group (e.g., "Core Group").
- Appropriately assign designations for Top Switch and Bottom Switch based on how you prepared your physical connections in step (2b).
- Click Set Up next to Multi-Chassis Link.
- Select the ports designated in (2c) and click Save.
- Click Save again to save the MC-LAG group.
-
Establish the remaining Multi-Chassis Link(s):
- Physically connect the remainder of ports designated in (2c).
-
Configure target device membership to aggregate ports of your MC-LAG pair:
- Within UniFi Network, navigate to Port Manager > MC-LAG.
- Select your MC-LAG Group, configured in (4).
- Create two separate Target Device Membership entries. Each entry will define ports that will be aggregated into a single link:
- Entry 1: Select Port 1 of both switches and click Save.
- Entry 2: Select Port 2 of both switches and click Save.
- Click Save again to save the configuration to the MC-LAG group.
-
Aggregate ports on the Primary EFG:
- Within UniFi Network, navigate to Devices.
- Select the EFG and open its Port Manager.
- Select Port 5.
- Under Advanced settings, change its Operation to Aggregating.
- Ensure Ports 5 and 6 are listed as the Aggregate Ports.
- Click Apply Changes.
- This configuration will automatically be applied to the Shadow Gateway.
-
Physically connect the remaining links:
- Connect Top Switch Port 2 to Shadow EFG Port 5.
- Connect Bottom Switch Port 1 to EFG Port 6.
- Connect Bottom Switch Port 2 to Shadow EFG Port 6.
EFG (Single Unit)
-
Ensure EFG Port 5 and Port 6 are configured as LAN ports:
- Navigate to UniFi Network > Settings > Internet.
- Select WAN 2.
- If it is being used, ensure WAN2 is set to either 3 or 4. Otherwise, disable it.
-
Prepare initial physical connections:
- Choose one of the two ECS Aggregation switches – this will be designated as Top Switch. The other will be your Bottom Switch (this distinction will be important later on).
- Connect Port 5 of the EFG to Port 1 of your Top Switch.
- Choose at least two numerically consecutive ports on your Top Switch – these will be designated as the Multi-Chassis Links. Reserve the exact same ports on your Bottom Switch for later.
- We recommend using a 100G link for this, available in ports 49-54.
- Connect your Bottom Switch to the Top Switch using the lowest numbered link port chosen in the previous step.
- Do not connect the others - they will be connected later in the setup process.
-
Adopt your ECS switches:
- For more information, go here.
-
Configure MC-LAG in UniFi Network:
- Within UniFi Network, navigate to Port Manager > MC-LAG and click Create New.
- Assign a Name to the MC-LAG group (e.g., "Core Group").
- Appropriately assign designations for Top Switch and Bottom Switch based on how you prepared your physical connections in step (2b).
- Click Set Up next to Multi-Chassis Link.
- Select the ports designated in (2c) and click Save.
- Click Save to save the MC-LAG group.
-
Establish the remaining Multi-Chassis Link(s):
- Physically connect the remainder of ports designated in (2c).
-
Configure target device membership to aggregate ports of your MC-LAG pair:
- Within UniFi Network, navigate to Port Manager > MC-LAG.
- Select your MC-LAG Group, configured in (4).
- Create a Target Device Membership entry. Each entry defines ports that will be aggregated into a single link.
- Select Port 1 of both switches and click Save.
- Click Save to save the configuration to the MC-LAG group.
-
Aggregate the ports on the EFG:
- Within UniFi Network, navigate to Devices.
- Select the EFG and open its Port Manager.
- Select Port 5.
- Under Advanced settings, change its Operation to Aggregating.
- Ensure Ports 5 and 6 are listed as the Aggregate Ports.
- Click Apply Changes.
-
Physically connect the remaining links:
- Connect Bottom Switch Port 1 to EFG Port 6.
Other Cloud Gateways (Shadow Mode Already Configured)
-
Prepare initial physical connections:
- On the MC-LAG Pair, choose one of the two ECS Aggregation switches – this will be designated as Top Switch. The other will be your Bottom Switch.
- Connect only one cable from the Top Switch to the upstream gateway.
- Choose at least two numerically consecutive ports on your Top Switch – these will be designated as the Multi-Chassis Links. Reserve the exact same ports on your Bottom Switch for later.
- We recommend using a 100G link for this, available in ports 49-54.
- Connect your Bottom Switch to the Top Switch using the lowest numbered link port chosen in the previous step.
- Do not connect the others - they will be connected later in the setup process.
-
Adopt your ECS switches:
- For more information, go here.
-
Configure MC-LAG in UniFi Network:
- Within UniFi Network, navigate to Port Manager > MC-LAG and click Create New.
- Assign a Name to the MC-LAG group (e.g., "Core Group").
- Appropriately assign designations for Top Switch and Bottom Switch based on how you prepared your physical connections in step (1b).
- Click Set Up next to Multi-Chassis Link.
- Select the ports designated in (1c) and click Save.
- Click Save to save the MC-LAG group.
-
Establish the remaining Multi-Chassis Link(s):
- Physically connect the remainder of ports designated in (1c).
-
Physically connect the remaining links:
- Connect Top Switch to Shadow Gateway. Use the corresponding port from (1b).
- Connect Bottom Switch to Primary Gateway.
- Connect Bottom Switch to Shadow Gateway. Use the corresponding port from (5b).
- Be aware that both ports on the Bottom Switch will be blocked by STP. Failover to the ECS-Aggregation switch blocked by STP may take up to 10 seconds.
Other Cloud Gateways (Single Unit)
-
Prepare initial physical connections:
- On the MC-LAG Pair, choose one of the two ECS Aggregation switches – this will be designated as Top Switch. The other will be your Bottom Switch.
- Connect only one cable from the Top Switch to the upstream gateway.
- Choose at least two numerically consecutive ports on your Top Switch – these will be designated as the Multi-Chassis Links. Reserve the exact same ports on your Bottom Switch for later.
- We recommend using a 100G link for this, available in ports 49-54.
- Connect your Bottom Switch to the Top Switch using the lowest numbered link port chosen in the previous step.
- Do not connect the others - they will be connected later in the setup process.
-
Adopt your ECS switches:
- For more information, go here.
-
Configure MC-LAG in UniFi Network:
- Within UniFi Network, navigate to Port Manager > MC-LAG and click Create New.
- Assign a Name to the MC-LAG group (e.g., "Core Group").
- Appropriately assign designations for Top Switch and Bottom Switch based on how you prepared your physical connections in step (1b).
- Click Set Up next to Multi-Chassis Link.
- Select the ports designated in (1c) and click Save.
- Click Save to save the MC-LAG group.
-
Establish the remaining Multi-Chassis Link(s):
- Physically connect the remainder of ports designated in (1c).
-
Physically connect the remaining links:
- Connect Bottom Switch to Primary Gateway.
- Be aware that STP will block a link between the gateway and one of your Aggregation Switches. Failover to the ECS-Aggregation switch blocked by STP may take up to 10 seconds.
Upstream Preestablished MC-LAG Pair
-
Prepare initial physical connections:
- On the Preexisting MC-LAG Pair, designate at least two ports on each of the Top and Bottom Switch that you intend to aggregate with the new MC-LAG pair. Ensure the ports selected on each switch are numerically consecutive.
- In your new pair of switches, choose one of the two ECS Aggregation switches – this will be designated as Top Switch. The other will be your Bottom Switch.
- On the New MC-LAG Pair, designate the same number of ports on the Top and Bottom Switches as in (1a). Ensure they are numerically sequential. These will connect to the Preexisting MC-LAG Pair in a later step.
- Connect only one cable from the numerically lowest port of the Top Switch from (1c) to the numerically lowest port of the Top Switch from (1a).
- Choose at least two numerically consecutive ports on your Top Switch – these will be designated as the Multi-Chassis Links. Reserve the exact same ports on your Bottom Switch for later.
- We recommend using a 100G link for this, available in ports 49-54.
- Connect your Bottom Switch to the Top Switch using the lowest numbered link port chosen in the previous step.
- Do not connect the others - they will be connected later in the setup process.
-
Adopt your ECS switches:
- For more information, go here.
-
Configure the new MC-LAG pair in UniFi Network:
- Within UniFi Network, navigate to Port Manager > MC-LAG and click Create New.
- Assign a Name to the MC-LAG group (e.g., "Secondary Group").
- Appropriately assign designations for Top Switch and Bottom Switch based on how you prepared your physical connections in step (1b).
- Click Set Up next to Multi-Chassis Link.
- Select the ports designated in (1e) and click Save.
- Click Save to save the MC-LAG group.
-
Establish the remaining Multi-Chassis Link(s):
- Physically connect the remainder of ports designated in (1e).
-
Configure target device membership to aggregate ports of your New MC-LAG pair:
- In UniFi Network, navigate to Port Manager > MC-LAG and select the new MC-LAG pair, configured in (3).
- Click Configure next to Target Devices Membership.
- Select all ports designated in (1c) and click Save.
- Click Save to save the configuration to the MC-LAG group.
-
Configure target device membership to aggregate ports of your Upstream MC-LAG pair:
- In UniFi Network, navigate to Port Manager > MC-LAG and select the preexisting MC-LAG pair.
- Click Configure next to Target Devices Membership.
- Select all ports designated in (1a) and click Save.
- Click Save to save the configuration to the MC-LAG group.
-
Physically connect the remaining links:
- Connect New Pair’s Top Switch to Preexisting Pair’s Bottom Switch.
- Connect New Pair’s Bottom Switch to Preexisting Pair’s Top Switch.
- Connect New Pair’s Bottom Switch to Preexisting Pair’s Bottom Switch.
Configuring Downstream Devices
Downstream devices include switches, servers, and stacked switches. The configuration differs depending on whether the target device is a standalone switch or server.
Standard Switches & Servers
Before you begin, ensure the two ECS-Aggregation switches have been successfully configured for MC-LAG following the steps in the section above.
-
Prepare initial physical connections:
- Designate at least one port on the Top and Bottom Switch that you intend to aggregate. If you plan to aggregate multiple ports per device, ensure they are numerically sequential.
- Add up the quantity of ports in (1a) and designate the same quantity of ports on your downstream device. If the downstream device is a UniFi Switch, make sure they are numerically adjacent port numbers.
- Connect only one cable from the target device to the numerically lowest port from (1a) on the Top Switch only.
- Note: If the downstream device is a UniFi Switch, this connection must be made to the numerically lowest port selected in (1b).
-
Aggregate the ports on the downstream target device:
-
UniFi Switch:
- Within UniFi Network, navigate to Devices.
- Select the downstream UniFi switch and open its Port Manager.
- Select the port currently connected to the Top Switch.
- Under Advanced settings, change its Operation to Aggregating.
- Ensure all required ports from (1b) are listed as the Aggregate Ports.
- Click Apply Changes.
-
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:
-
Configure target device membership to aggregate ports of your MC-LAG pair:
- 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 already been configured).
- Select the ports designated in (1a) on each switch in the MC-LAG pair and click Save.
- Click Save to save the configuration to the MC-LAG group.
-
Finish the physical connections:
- Connect the target device to the two ECS-Aggregation switches using the ports configured in the previous steps.