Network loops occur when there are multiple paths between a specific source and destination. Rather than traffic reaching its destination and stopping, it will circulate and continue amplifying the amount of data moving through the network. This can result in a range of issues including:
- Unexpected port blockage via STP/RSTP
- Performance degradation
- Complete network outages
- Device crashes due to traffic overload
These consequences could be network-wide, or concentrated to specific segments of the network.
Fortunately, there are several steps you can take to prevent network loops.
- Avoid overutilizing the built-in switch ports on your UniFi Gateway. Instead, plug one UniFi switch into your gateway and use that as the “core switch” to which all other devices are connected. This enables added resiliency through STP, which gateway switch ports do not support.
- Ensure all switches in central areas of your network support STP. Devices like the Flex, Flex Mini, and In-Wall APs do not support STP and thus should only be used at the edge of your network.
- Configure STP settings such that core switches are prioritized. Learn more.
- Use RSTP instead of STP for faster resolution after a loop is detected. This is the default setting on UniFi switches, but any third-party devices may need to be configured as such.
- Disable Wireless Meshing if no APs are wirelessly adopted.
- Follow best practices for Sonos and IoT devices.
- Check for bad cables, and replace them. Their poor link negotiation may cause rapid STP priority changes (flapping) that result in persistent interruptions in connectivity.
Loop Identification Tips
Identifying the exact cause and location of a network loop is often challenging. Here are some general guidelines:
- Take advantage of your UniFi Network analytics. The Ports page can be used to look for unexpectedly high traffic or STP blockages (denoted by a ⊘ symbol).
- Start at the "edge" of the network and manually disconnect devices until the loop resolves. This will indicate the links/devices that are creating the loop.
- Check for any Sonos and IoT devices to ensure you are following best practices.