Spanning Tree – Preventing STP Loops in EtherChannel Configurations

best practicesspanning tree

What is the best practice when configuring etherchannel on Cisco switches to prevent a STP loop/broadcast storm when etherchannel is mis-configured?

I had an instance where 2 ports on a switch were configured with via trunk ports properly however the opposing switch was only had one port switch as a trunk, the 2nd as a regular access port. Upon a power-cycle, a broadcast storm took down the network and originated from these two switches.
channel-group 1 mode on was configured on all ports.

From my research
L2 etherchannel links should be configured with only

channel-group 1 mode desirable

L3 links can be configured w/ channel-group 1 mode on as STP isn't running over them.

Unfortunately in this scenario PVST+ was configured and bdpuguard was missing on all edge ports 🙁
Lastly, all switches here are Cisco – not a multi-vendor environment

Best Answer

You should not be using "on" for link aggregation as it can lead to problems. On the side with aggregation statically on, it will use the interfaces in the etherchannel, no matter what the configuration is on the other side.

While storm control (from comments) can be very helpful with some of the problems that result, it does not resolve all of them. For instance if one of the remote side links is an access port on a different VLAN, all traffic that goes down that port will likely never reach its destination. Depending on how constant the traffic and the load balancing across the etherchannel, this may result in a complete "outage" for some hosts.

I always recommend the use of LACP over PAgP, so instead of desirable/auto or on, use either active on both sides or active on one and passive on the other. The reason for this is that LACP is standards based while PAgP is Cisco proprietary.

Of course this is in part dependent on the hardware platform, so check the appropriate documentation for your platform.