Using Sonos devices in a UniFi network has been a common source of network issues which can be hard to detect. Over the years, there have been many threads in the UniFi Community, Sonos Community, Reddit, and other places. This document aims to provide a canonical, community-driven, and up-to-date reference for the most common use cases.
If you have Sonos devices in your UniFi network, you may experience some of the following symptoms which may appear unrelated but are a consequence of broadcast storms:
Sonos OS (even the current S2) uses older / pre-standard STP path costs which makes it incompatible with the newer RSTP protocol which was introduced in 2001 and is the default for UniFi switches. STP can take up to a minute to converge, while RSTP typically converges under ten seconds in normal operation.
This becomes a problem when you operate both wired and wireless Sonos device in your network (even without SonosNet) and can result in a wireless path being preferred over wired, ports being blocked, or broadcast storms.
Ubiquiti has published best practices on https://help.ui.com/hc/en-us/articles/18930473041047-Best-Practices-for-Sonos-Devices. These are also linked to from the detail pages of Sonos devices in the Network application.
The best practices are unfortunately quite restrictive and suggest that once there is a single wireless Sonos device on the network, no other Sonos device may be wired.
You can use the following settings (as of Sonos OS S2 13.2, UniFi Network Application 8.3.32) to mix wired an wireless Sonos devices:
$YOUR_NETWORK
$YOUR_NETWORK
$DEVICE
-> Settings -> Advanced -> Spanning Tree Protocol (for switches where Global Switch Settings is disabled)$DEVICE
-> Port Manager -> $AFFECTED_PORT
-> AdvancedAlternatively, you can change all your switches to use STP instead of RSTP, but this may make acquiring an IP over DHCP slow. If you do that, assign priority values manually: use priority 4096 for your main switch (going to your router/firewall) and add 4096 for each hop from there (e.g. 8192 for second-level switches, 12288 for third-layer switches). However, the UDM, UDMP, UDM-SE, and UDM-Pro-Max do not support STP. It can be temporarily enabled using brctl setbridgeprio br0 4096; brctl stp br0 on
(or just don't connect any wired Sonos devices to the internal switch of a UDM).