Addressing Loops and Managing Redundancy (STP)

Managing loops is a common challenge in networking. Network loops occur when there are multiple data paths between two points, either accidentally or by design (for redundant fault tolerance). Uncontrolled loops can destabilize networks, but the Spanning Tree Protocol (STP) provides a solution.

2.png

Understanding STP & RSTP

STP generates a loop-free logical topology by selectively blocking some paths based on factors like link speed and switch priority. Rapid Spanning Tree Protocol (RSTP) is an evolution of STP that speeds up responses to topology changes by designating roles to switch ports and proactively establishing alternative paths.

3.png

Implementing STP in UniFi

RSTP is enabled by default on UniFi switches, but it can be toggled in the following places:

  • Globally: Settings > Networks > Spanning Tree.
  • Per Switch: UniFi Devices > [Select switch] > Settings > Spanning Tree.
  • Per Port: UniFi Devices > [Select switch] > Port Manager > Select a port > Spanning Tree Protocol.

Note: We do not recommend disabling Spanning Tree.

Configuring STP Priorities

Configuring appropriate STP priorities is essential for ensuring that the most reliable core-switch is designated as the root switch. This is important because STP prioritizes the most optimal paths to the root switch and then blocks other redundant links. The root switch is the one with the highest priority, as indicated by the lowest numerical priority assignment. To assign STP priorities effectively:

  1. Assign the root switch a priority of 0.
  2. Assign the switches in the next layer a priority of 4096.
  3. Continue incrementing the priority value by 4096 for each subsequent layer of switches (8192 > 12288 > etc.).

Note: If 0 isn't allowed in the specific STP implementation, start with 4096 and increase from there.

1.png

To adjust a switch’s STP Priority in UniFi:

  1. Navigate to UniFi Devices.
  2. Select the switch in question.
  3. Select Settings and adjust the Priority.
Was this article helpful?
674 out of 838 found this helpful