[stordis-toc]
Introduction
A Port Channel (LACP, Link Aggregation Control Protocol, IEEE 802.3ad) bundles more physical interfaces into one logical interface on a SONiC switch. This gives:
- more bandwidth, because the links operate together,
- redundancy if a link fails,
- better load balancing.
If one physical link fails, the traffic continues through the other links. There is no single point of failure (SPOF).
This guide shows how to configure a Port Channel with LACP between two SONiC switches.
Prerequisites
- Two switches with SONiC.
- Console or SSH access to the switches. For the console: terminal software (PuTTY, Tera Term, SecureCRT) and the serial console cable that comes with the device.
- Basic knowledge of the Linux CLI.
- Two test hosts with static IP addresses in the same subnet. In this guide: PC2 (192.168.1.12/24) and PC6 (192.168.1.13/24).
Topology
NOTE
Make sure that all member interfaces:
- have no L3 configuration (no IP address),
- are not members of a VLAN,
- have the same speed, MTU and duplex settings.
Refer to How to use SONiC - Port attributes?
Port Channel command generator
Type your settings. The generator makes the commands of Steps 1–5 for one switch. Use the same commands on the second switch, with the member interfaces of that switch. The generator operates only in your browser.
The command generator needs JavaScript. Use the commands in Steps 1–5.
Step 1: Create the Port Channel
On both switches:
sudo config portchannel add PortChannel1
The name must be PortChannel and a number.
Step 2: Add the member interfaces
On both switches:
sudo config portchannel member add PortChannel1 Ethernet0 sudo config portchannel member add PortChannel1 Ethernet4
Make sure that the interfaces are up and in the Port Channel:
show interfaces status
For Ethernet0 and Ethernet4, the result must show:
- Oper: up
- Vlan: PortChannel1
Step 3: Add the Port Channel to VLAN 10
- On both switches, create VLAN 10 (skip this if VLAN 10 exists):
sudo config vlan add 10
- Add the Port Channel to VLAN 10 as a tagged member (trunk):
sudo config vlan member add 10 PortChannel1
- Add the port of the test host to VLAN 10 as an untagged member.
On SW1 (PC2 on Ethernet12):
sudo config vlan member add -u 10 Ethernet12
On SW2 (PC6 on Ethernet20):
sudo config vlan member add -u 10 Ethernet20
Step 4: Verify the Port Channel
- On both switches:
show interfaces portchannel
The result must show:
- PortChannel1: LACP(A)(Up). A = active LACP, Up = the Port Channel operates.
- Member interfaces: (S) = selected.
- From PC2, ping PC6. The ping must be successful:
ping 192.168.1.13
- Optional: disconnect one member link. The ping must continue through the other link.
Step 5: Save the configuration
On both switches, save the configuration. If you do not save it, the switch loses the Port Channel after a reboot.
sudo config save -y
Troubleshooting
Make sure that:
- all members are the same interface type (for example Ethernet),
- all members have the same speed, duplex and MTU,
- the members have no L2/L3 configuration: no IP address, no MAC address, no VLAN. Only description and shutdown / no shutdown are supported,
- each port is a member of only one Port Channel,
- the configuration is the same on both switches.
- Make sure that the Port Channel and the host ports are in VLAN 10:
show vlan brief - Make sure that the hosts have IP addresses in the same subnet.
The configuration was not saved. Configure it again and do Step 5.
Procedure completion
Congratulations!
You have successfully configured a Port Channel with LACP in SONiC. Your switches now have more bandwidth and redundancy between them.
If you have questions about this article, contact our technical support team.
Happy networking!
Useful links:
How to use SONiC - Port attributes?
How to configure VLANs in SONiC?
How to Back Up and Restore Configuration in SONiC
How can I set up a console connection to Edgecore Open Networking switch?
For more free resources, visit: https://stordis.com/free-resources/
Still have questions? You can find more answers in our STORDIS Support Portal FAQ.
Comments 0
Comments
Please sign in to leave a comment.