[What Is] LAG & MLAG

05/08/2025

Transferring large volumes of data between your servers requires more than just a basic network connection.

While a simple physical link might work in small setups, enterprise environments demand greater bandwidth, resilience, and flexibility.

With our extensive knowledge and networking, including the expertise of our Senior Administrator Peter Barlík, we have prepared a quick guide on the differences between various types of Layer 2 links, including example configurations on Cisco and SONiC-enabled devices.

Now, let’s explore Link Aggregation and Multi-Chassis Link Aggregation! Two key technologies that elevate network reliability and throughput.

Back to Basics: One-to-One Linking

This is the most straightforward setup: a single cable connects two devices – like a server and a switch, or two switches.

It offers simplicity and ease of troubleshooting, but you’re limited to the speed of a single link. There’s no link-level redundancy, making it a poor fit for enterprise environments.

We love analogies, so here goes the first one – imagine a single-lane road between two towns. If it’s blocked or congested, you’re stuck. There is no other alternative road to avoid the congestion.

Configuration: No special configuration is required – default switch port settings will suffice.

LAG: Link Aggregation Group

LAG bundles multiple Ethernet links between two devices into a single logical connection – often referred to as an EtherChannel, port-channel, bond, or team.

The aim is to increase bandwidth and add redundancy. We differentiate between three main aggregation protocols – Manual LAG, LACP and PAgP. Let’s explain each type in the following section.

Manual LAG

A static configuration without negotiation. It’s simple, but lacks built-in fault detection or dynamic adjustment. Link failures are harder to detect and recover from.

This makes for another great analogy! Imagine a multi-lane road. However, you don’t know which lanes are blocked, until you’re already in them.

LACP: Link Aggregation Control Protocol

LACP, defined in IEEE 802.3ad (now part of IEEE 802.1AX), is a dynamic protocol, that automatically negotiates and maintains aggregation. It uses LACP Data Units (LACPDUs) to exchange state information.

This protocol sends the mentioned data units (frames) to a compatible, LACP enabled device. It has two modes:

    • Active Mode: Initiates LACP negotiation and sends 1 LACPDU per second via configured links.
    • Passive Mode: Only responds to LACPPDUs from an active peer. If a frame is received, only then is another sent back (back-and-forth).

LACP improves fault detection and enables automatic traffic redistribution when a link fails. It’s widely supported and often a preferred method.

Our lane analogies expand – you see a multi-lane road with smart signs, showing congestion and closures in real time.

PAgP: Port Aggregation Protocol

This is Cisco’s proprietary alternative to LACP, with similar functionality. Again, we have two modes:

    • Desirable Mode: Active negotiation.
    • Auto Mode: Responds to negotiation from the desired peer.

Unfortunately, this lane is only for Cisco enabled cars. By cars, we mean devices.

Common LAG Use-Cases

Small businesses aiming to increase bandwidth and add link-level redundancy often turn to LAG. It’s a balanced solution for performance, resilience, and therefore fairly common.

LAG Config Examples

These configuration examples refer to Cisco IOS-XE v. 17.1 and SONiC Enterprise v. 4.5.0.

Cisco

We can see several characteristics of Cisco’s way of configuring LAG. Firstly, we define the physical interfaces to be aggregated.

Then, we assign them to a channel-group and specify the mode (active/passive), which automatically creates and binds them to a logical PortChannel interface.

</p>
switch# configure terminal 
switch(config)# interface range ethernet 1/1-2
switch(config-if)# channel-group 1 mode [active/passive]
<p>

SONiC

SONiC’s configuration requires creating an interface PortChannel before assigning ports to it but the saved configuration is very similar.

We define the logical PortChannel interface explicitly at first, then define the physical ports. Finally, we bind these physical interfaces to the defined PortChannel.

</p>
$ sonic-cli
LAGSW1# configure terminal
LAGSW1(config)# interface PortChannel 1
LAGSW1(conf-if-po1)# exit
LAGSW1(config)# interface range Ethernet0-1
LAGSW1(conf-if-range-eth**)# channel-group 1
LAGSW1(config)# exit
<p>

Multi-Chassis Link Aggregation

While LAG allows us to combine multiple links between two devices, MLAG extends this capability towards two switches, allowing a device (like a server or another switch) to connect to two physical switches as if they were one logical unit. This offers both link and device-level redundancy – in case one switch fails.

The participating switches synchronize over an Inter-Chassis Link (ICL) or Peer Link and behave as a single virtual switch externally. Internally, they share state information to maintain link consistency.

MLAG is ideal for data centers and large enterprises demanding high availability and zero-downtime resiliency.

The train station in the city doesn’t have enough capacity to transfer passengers to the next station, nor space to expand at the current location.

The city built another train station nearby with direct quick high capacity connection between station peers and parallel rails to the next station.

If something happens to one of the stations or any of rails, you can still use another station or rest of rails to your destination.

MLAG Configuration Examples

Cisco – Stackwise vs. Stackwise virtual (SVL) vs. Virtual Port-Channel (vPC)

For stackable Cisco switches, LACP configuration is similar to the LAG setup. The only difference is, that defined ports spread through switches. Traditional Stackwise is supported by C3850 and C9300 Series switches while SVL is supported on C9400 and C9500 series switches.

vPC Configuration Sample

Let’s break down the example below. First, both chassis are prepared with identical configurations. VPC feature is enabled, keepalive is set and VPC peering is fully formed. 

Then, port-channel is configured with a VPC number. This allows downstream devices to connect as if they’re interfacing with a single switch, while redundancy is maintained at the hardware level.

</p>
Switch-1# copy startup-config disk0:old-startup-config
Switch-1(config)# feature vpc
Switch-1(config)# vpc domain 1
Switch-1(config-vpc-domain)# peer-keepalive destination 192.168.1.2 source 192.168.1.1
Switch-1(config)# interface port-channel 1 
Switch-1(config-if)# switchport mode trunk
Switch-1(config-if)# interface Ethernet1/1-2
Switch-1(config-if-range)# channel-group 1 mode active 
Switch-1(config-if-range)# interface port-channel 1
Switch-1(config-if)# vpc peer-link

Switch-1(config)# interface Ethernet1/3 
Switch-1(config-if)# switchport mode access 
Switch-1(config-if)# switchport access vlan 10
Switch-1(config-if)# channel-group 10 mode active 
Switch-1(config-if)# interface port-channel10 
Switch-1(config-if)# vpc 10

<p>

SONiC (MCLAG)

Again, SONiC offers more steps with precise control. First, a logical PortChannel is defined, and a peer-link is created using mclag domain, specifying local and remote peer IPs. Physical ports are selected, then assigned to the PortChannel.

A second PortChannel (mapped to the MLAG domain) is configured to aggregate downstream links. Though both switches operate independently, they share PortChannel and state information via the peer link, for consistency and failover resilience.

</p>
$ sonic-cli
MLAGSW1# configure terminal
MLAGSW1(config)# interface PortChannel 1
MLAGSW1(config-if-po1)# switchport trunk allowed Vlan [Vlan-id_list/all]
MLAGSW1(conf)# mclag domain 1
MLAGSW1(config-mclag-domain-1)# peer-link PortChannel1
MLAGSW1(config-mclag-domain-1)# source-ip 10.0.0.1
MLAGSW1(config-mclag-domain-1)# peer-ip 10.0.0.2
MLAGSW1(config)# interface range Ethernet0-1
MLAGSW1(conf-if-range-eth**)# channel-group 1
MLAGSW1(config)# interface PortChannel 10
MLAGSW1(config-if-po1)# mclag 1
MLAGSW1(config)# interface range Ethernet10-11
MLAGSW1(conf-if-range-eth**)# channel-group 10
<p>

Each switch in the MCLAG domain operates independently but synchronizes PortChannel assignments and link states for seamless failover and load sharing.

LAG and MLAG are fundamental for scalable, resilient networking – especially in environments where performance and uptime are critical. Whether you’re optimizing a small business setup or designing a fault-tolerant data center fabric, these technologies offer proven strategies to boost bandwidth and minimize disruption.

Curious about how PortChannels work in SandWork, our orchestration solution? Book a demo today to see LAG and MLAG in action with SandWork, our intuitive network automation and orchestration platform!

Related Articles

[What Are] PortChannels

Network engineers love throwing around terms like LAG, EtherChannel, MC-LAG - and somewhere in the mix, you’ll hear PortChannel. But what exactly is a PortChannel, and where does it fit into modern data center design? Let’s break it down in a way that makes sense,...

read more

[What Is] VLAN & VXLAN

Let’s start with an analogy - a busy airport. Thousands of passengers, dozens of terminals, countless gates. Now imagine trying to direct all that traffic - keeping passengers moving smoothly, without ending up at the wrong destination.  That’s what modern networks...

read more

[What Is] Whitebox Networking?

A deep dive into open-source & SONiC Solutions One of the many challenges in modern networking is the big decision, between vendor-locked and open-source solutions.  While entry prices for vendor-locked solutions seem viable, they can become unbearable in the long...

read more