Download raw body.
trunk(4): deprecate LACP mode
On 03/12/2025 10:46, Chaz Kettleson wrote: > On Tue, Dec 02, 2025 at 06:09:09AM -0500, Chaz Kettleson wrote: >> On Tue, Dec 02, 2025 at 05:14:58PM +1000, David Gwynne wrote: >>> aggr(4) is a better option for LACP for several reasons: >>> >>> - in my experience aggr is better at following the standard >>> >>> it doesn't get into weird states that blackhole traffic at the worst >>> possible times. >>> >>> - aggr is mpsafe >>> >>> the last time i looked at trying to make the lacp code mpsafe in >>> trunk(4) i ended up writing aggr(4). this lack of mpsafety is now >>> making it hard to unlock more of the network stack. >>> >>> - aggr is faster than trunk >>> >>> looking at the benchmarking we did when i first introduced aggr, >>> it looks like using trunk(4) more than halved the pps you can >>> forward through a box, while aggr was more like a 10 to 15% hit. >>> switching from trunk to aggr in our environment doubled our firewall >>> performance. >>> >>> apart from these implementation differences, there's a few operational >>> ones too that sthen@ has pointed out: >>> >>> - aggr uses a random MAC by default, trunk uses the MAC of the first- >>> added child port. >>> >>> - aggr does not bring the interface up automatically, you must use "up". >>> >>> anyone still using trunk(4) for LACP links will need to do at least the >>> following: >>> >>> # mv hostname.trunk0 hostname.aggr0 >>> # echo up >> hostname.aggr0 >>> >>> if you want a predictable MAC address on an aggr interface, you'll need >>> to specify the lladdr before bringing it up. for example, my configs >>> looks like this: >>> >>> lladdr fe:e1:ba:d0:e8:43 >>> trunkport ixl0 >>> trunkport ixl1 >>> up >>> >>> a bunch of vlan interfaces sit on top of this, which is why it doesnt >>> have address config of its own. >>> >>> an example with ips: >>> >>> lladdr fe:e1:ba:d0:7c:ff >>> trunkproto lacp >>> trunkport ix0 >>> trunkport ix1 >>> inet 192.0.2.216 255.255.255.0 >>> inet6 2001:db8:230f:bc24:d3d8:7b58:f17c:f96e 64 >>> up >>> >> Hello, >> >> Do you know of any cases where aggr is _not_ a complete replacement for >> trunk? A few years ago I setup a Dell PowerConnect 5224 in LACP and was >> unable to get aggr to work, however, the following does work for me: >> >> cat /etc/hostname.trunk0 >> trunkproto lacp >> trunkport bnx0 >> trunkport bnx1 >> trunkport bge0 >> up >> >> I can give it a shot again tonight to see if I missed something when I >> initially tried aggr. >> >> -- >> Chaz >> > Hello, > > Good news, everything appears to work. > > 1. mv /etc/hostname.trunk0 /etc/hostname.aggr0 > 2. removed trunkproto lacp (no longer needed) > 3. updated all hostname.vlan* with parent aggr0 > > Not sure if something changed since 6.9/7.0 to now, or if I messed > something up when I originally tried -- but everything is working as > expected now! > > Thanks for the motivation to change this. that's a relief. thanks for revisiting this. enjoy the extra pps.
trunk(4): deprecate LACP mode