• Stars
    star
    173
  • Rank 220,124 (Top 5 %)
  • Language
  • License
    MIT License
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

How to configure your UniFi network for Sonos

How to configure your UniFi network for Sonos

Goal

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.

Symptoms

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:

  • .local name resolution not working
  • Sonos speakers disappear from the network
  • AirPrint-capable printers are not available
  • HomeKit devices not found
  • Time Machine backups fail
  • Mobile applications fails to discover devices on the local network (e.g. the IKEA Smart Home app)

Root Cause

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.

Recommended Settings

Use the following settings (as of Sonos OS S2 13.2, UniFi Network Application 7.4.156):

  • Multicast DNS: on (likely required only if Sonos devices are segregated into a separate VLAN)
    • Settings -> Networks -> $YOUR_NETWORK
  • IGMP Snooping: on (helps reduce the multicast traffic from Sonos devices)
    • Settings -> Networks -> $YOUR_NETWORK
  • Multicast Enhancement (IGMPv3): on
    • Settings -> Wireless Networks -> $YOUR_NETWORK
  • Multicast and Broadcast Control: off
    • Devices -> $DEVICE -> Ports -> $AFFECTED_PORT
  • Block LAN to WLAN multicast and broadcast data (Classic UI): off
    • Settings -> Wireless Networks -> $YOUR_NETWORK
  • Spanning Tree: RSTP
    • Networks -> Global Switch Settings
    • UniFi Devices -> $DEVICE -> Settings -> Advanced -> Spanning Tree
  • Port settings on the LAN ports that connect to Sonos gear: disable Enable Spanning Tree Protocol
    • UniFi Devices -> $DEVICE -> Ports -> $AFFECTED_PORT

Alternatively, 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, and UDM-SE do not support STP. It can be temporarily enabled using brctl setbridgeprio br0 4096; brctl stp br0 on.

References

Official Documentation

Community Threads

Other