In this short post i’ll go through what link aggregation is, how it works and when/where it could be applied. And in the end a basic practical example how to setup lagg in freebsd 11.0
This is link aggregation
Link aggregation is pretty much grouping two more more network interfaces into one network group, creating either failover or a high throughput connection. The more interfaces you add to the group the higher the throughput you get and lesser risk of the connection to fail. There are also some weaknesses in link aggregation, for example if by co-incident two larger file transfers decides to go on link 1 in the group, then it’s only able to max the speed on link 1, and link 2 in the group is unused.
There are also different ways to use link aggregation which you could read at freebsd’s documentation under: round robin, lacp, failover, and fec / loadbalance.
Where / when to use it
Some use it to cut cost’s, for example its much cheaper to activate link aggregation on existing hardware and get some extra speed than buying a whole new equipment with better link speeds. New equipment usually means more work hours for the workers, planning, and paying for the equipment. But i would never recommend doing this, because you are just pushing the issue another couple of months forward. Instead its a solution to prevent downtime in the wait for new equipment to arrive, and give time to plan ahead and implement the new solution / upgrade. Link aggregation could also be used for redundancy one link breaks the other one takes the load, one other time to use link aggregation is for events that require more speed than the usual load, for example conventions or LANS.
Easy setup to enable link aggregation on two network ports. Both ports will listen to the ip 10.0.2.2, remember to enable link aggregation on the switch or the network device connected to this server.
# load lagg upon boot if_lagg_load="YES"
# Start both network cards ifconfig_em0="up" ifconfig_em1="up" # Clone them into lagg0 and a loopback lo1 cloned_interfaces="lagg0 lo1" # Put the lagg interface up, and select the lagg protocol lacp, # group the interfaces (laggports), and set a ip address to lagg0 10.0.2.2 ifconfig_lagg0="up laggproto lacp laggport em0 laggport em1 10.0.2.2/24" # set the default route (gateway) defaultrouter="10.0.2.1"
Much of the information is from the good documentation that freebsd has to offer, in this case: https://www.freebsd.org/doc/handbook/network-aggregation.html