LAG with Linux
• Mark Eschbach
I have three fancy devices which support Link Aggregation Groups which connect to each other. Expecting a large amount of traffic regularly flowing between them means I have an excuse to learn about this and get the nodes setup. There are multiple implemenations of LAG referred to as modes. I can see use cases for all of them however I am most interested in mode 4 which supports fault tolernce in failure modes while also allowing full resource utilization in optimal operating conditions. This means I will have a 2Gbps link between each of the devices. Most likely I will not saturate this however it will still be fun to learn. Anyway, unused hardware is wasted hardware and not doing this means I have excess ethernet ports :-).
The gist to get this setup seems to be the following:
- Ensure the
bondingkernel module is loaded. This can be confirmed by
lsmod |grep -i bonding.
- Create a new
- Attach the actual ethernet devices to the interface
- Verify via
This Rackspace article looks great for the InitD folks, however the system I am currently working against is a SystemD based setup. Although poorly formatted a Manjaro article looks like a good start.
To get started loading the module is easy this time:
modprobe bonding. The module definitely creates
and we can verify there are no bonds yet. Well it looks like I was a bit hasty. Upon further investigation Ubuntu is
still using NetworkManager on the 18.10 release. I’ll need to use that.
I was not able to get the
bonding0 device to exist. I tried the
echo +foo >/sys/class/net/bonding_masters however
this resulted in repeated rejections. I will have to approach this more gingerly in the future instead of taking the
whole node offline due to optimism.
sudo ifdown -awill shutdown all network interfaces
sudo ifup -awill bring the interfaces all back up.