How to set up Port Channels (LACP) in SONiC?

[stordis-toc]

 

Introduction

Port Channel (LACP - Link Aggregation Control Protocol, IEEE 802.3ad) allows multiple physical interfaces to be bundled into a single logical interface on a SONiC switch.

This provides:

  • increased bandwidth by aggregating multiple links
  • redundancy in case of link failure
  • improved load balancing

If one physical link fails, traffic continues to flow through the remaining active links, eliminating a single point of failure (SPOF).

This article explains how to configure a Port Channel using LACP in SONiC.

 

Prerequisites

Before starting the configuration, ensure you have the following:

  • SONiC installed on the switches
  • Console or SSH access to the switches
  • Console terminal software: PuTTY, Teraterm, SecureCRT, etc.
  • Serial Console cable: Provided with the device
  • Basic Linux CLI knowledge
  • Configured static IP addresses on all PCs (according to Topology below)
  • IP connectivity between test hosts PC2 and PC6

 

Topology

Configure Port Channels (LACP)

Note

Ensure that all member interfaces:

  • do not have any L3 configuration
  • have consistent speed, MTU, and duplex settings

Article below may be helpful for you.
How to use SONiC - Port attributes?


Create Port Channel

On both switches:

sudo config portchannel add PortChannel1

 

Add Member Interfaces

On both switches:

sudo config portchannel member add PortChannel1 Ethernet0
sudo config portchannel member add PortChannel1 Ethernet4

 

Verify Interface Status

Run the following commands on both switches:

show interfaces status

Expected result for interfaces Ethernet0 and Ethernet4:

  • Operational status: Up
  • Interface is assigned to PortChannel1

 

Configure VLAN (Trunk)

Note

Make sure VLAN 10 is created on both switches before adding the Port Channel.

On both switches, add Port Channel to VLAN 10 as tagged member:

sudo config vlan member add 10 PortChannel1

 

Verify Port Channel Configuration

Run the following commands on both switches:

show interfaces portchannel

Expected result:

  • PortChannel1 status: Up
  • LACP state: Active
  • Member interfaces: Selected

Example:

 

Test connectivity

Verify connectivity between hosts (e.g., PC2 and PC6):

ping <destination-ip>

Ping between PCs in VLAN 10 should succeed.

 

Troubleshooting

If the Port Channel is not working, make sure:

  • All members must be the same interface type (such as Ethernet)
  • All member interfaces must have the same Speed/Duplex/MTU
  • An interface must not contain nondefault L2/L3 configuration settings. Only the description and shutdown or no shutdown commands are supported
  • A port can belong to only one Port Channel
  • Do not configure IP or MAC on member interfaces

Verification commands:

  • show interfaces portchannel
  • show interfaces status

 

Congratulations!

You have successfully configured a Port Channel using LACP in SONiC. This configuration improves both bandwidth and redundancy, making it a key feature in modern network design.

If you have any questions related to this article, feel free to reach out to our technical support team.

Happy Networking!

 

Useful links

Official SONiC repository

 

If you want to explore more topics, be sure to check out our other guides, including:

How can I set up a console connection to Edgecore Open Networking switch?

How to backup/recover the configuration in SONiC?

How to Reset Password in SONiC?

How to use SONiC Port attributes

Where to download the SONiC Virtual Switch (VS) community pre-built image?

 

For more free resources, visit: 

https://stordis.com/free-resources/

 

Still have questions? You can find more answers in our full FAQ - just follow the link below.

STORDIS Support Portal FAQ

Comments 0

Articles in this section