Advanced Ubiquiti Networking

Creating mid-size networks requires some more advanced features for fault tolerance.

Spanning Tree is a necessary evil, it sends special packets (BPDU) out each port and listens for them to be received on other ports, indicating that there is a loop. It then tries to create a block to prevent that loop. Problems arise when users don’t set a Root switch and allow a random switch to get elected. Then when STP (Spanning Tree Protocol) tries to cut the loop farthest from the root, it gets cut on an inconvenient link. Its also annoying when STP does an election every time a new switch is plugged or unplugged because someone didn’t set the root switch to the LOWEST priority (you would think they would have enough sense to call it a weight when lowest has precedence).

This might make you think that disabling STP is a good option but it protects the network from mistakes. I have seen large-ish networks brought down by plugging both ports of a VoIP phone into separate switches when STP was only disabled on the switch interlinks.

Ubiquiti supports STP and Rapid Spanning Tree RSTP. RSTP avoids a 30 second listening period before forwarding traffic. this is ideal for “leaf” ports that have workstations plugged in.

Story Time; Spanning tree was invented BEFORE VLANs so it is VLAN ignorant. If someone were to split 2 switches each into 2 virtual switches, and then try to connect each virtual switch with a separate cable, STP will block 1 of those cables, orphaning one of the VLANs.

Ubiquiti does NOT support MSTP, Multi-spanning tree protocol, which IS VLAN aware and more efficient as it can allow more ports to be active. In our scenario above, MSTP would correctly allow both cables to be active AND 2 cables would provide DOUBLE the bandwidth between the switches. MSTP would only block a port if we added a 3rd cable between the switches.

Ubiquiti specific info here https://help.ui.com/hc/en-us/articles/360006836773-UniFi-USW-Configuring-Spanning-Tree-Protocol

Next Topic is LAG, LACP or Link Aggregation;

This is a method to avoid STP by telling 2 or more cables to act as a single cable. it adds together the bandwidth from both cables and provides resiliency if one of the cables is broken. But it is a completely manual setup whereas STP is automatic and in simple setups just works. LACP is designed to bundle links between 2 switches whereas STP can have any number of switches in a loop.

LACP has been extended to work with 3+ switches and is usually named MLT, SMLT, DMLT, SLT, IST, RSMLT etc depending on the vendor.

sduncan