Portchannel (Link Aggregation Group - LAG)
Objective
This document explains how to configure a port channel (Link Aggregation Group, LAG) . A port channel is a logical communication link that combines multiple physical Ethernet ports into one aggregated connection, increasing bandwidth and providing redundancy between two network devices (such as switches or routers).
Prerequisites
Hardware:
Switches or routers that support VLANs
(e.g., edgecore, ufispace)
Software:
Network operating systems that support VLAN configuration
(e.g., SONiC-OS-4.4.0-Enterprise_Base, SONiC-OS-4.4.2-Enterprise_Base)
Access:
Administrative or privileged CLI access
Network:
At least two physical interfaces per side to bundle into the port channel
Consistent configuration on both ends (same speed, duplex, MTU, etc.)
Topology Diagram
Example:
Aggregating multiple links between two switches to increase bandwidth and provide failover.
Basic Configuration Steps
1. Identify Member Interfaces
Choose the interfaces to include in the port channel.
2. Create Port Channel
Define the logical port channel or channel group on the device.
Syntax:
sonic# configure terminal
sonic(config)# interface PortChannel <id>
sonic(config-if-po1)# description <string>
Example:
sonic(config)# interface PortChannel 1
sonic(config-if-po1)# description portchannel-for-testing
3. Assign Interfaces to the Port Channel
Add the selected physical interfaces into the port channel.
Syntax:
sonic# configure terminal
sonic(config)# interface Ethernet <interface_id>
sonic(config-if)# channel-group <port-channel-id>
Example:
sonic(config)# interface Ethernet 124
sonic(config-if)# channel-group 1
Example Configuration (DUT_1 and DUT_2)
DUT_1
configure terminal
interface PortChannel 1
description portchannel-for-testing
interface ethernet 124
channel-group 1
interface ethernet 128
channel-group 1
DUT_2
configure terminal
interface PortChannel 1
description portchannel-for-testing
interface ethernet 64
channel-group 1
interface ethernet 68
channel-group 1
Verification
show port-channel summary #shows port channel status
show interfaces status #shows interface status
#Check used interfaces admin and oper status is up or not.
Troubleshooting Tips
Ensure identical configuration (speed, duplex, MTU) on both ends.
Check that all member interfaces are up and properly joined.
Verify LACP mode (active/passive) matches on both sides.
Monitor show port-channel and show lacp outputs for mismatches or failures.
Review logs for interface or aggregation-related errors.