Skip to main content
Retired Sonos Staff
June 10, 2010

Sonos and the Spanning Tree Protocol

I wanted to post a few clarifications regarding SONOS and Spanning Tree Protocol that have been raised in this thread.

SONOS ZonePlayers use 802.1D Spanning Tree (STP) for loop prevention between wired ZonePlayers and the wireless SonosNet Mesh Network. The Spanning Tree running on ZonePlayers is compliant with IEEE 802.1D and can inter-operate with other IEEE 802.1D and IEEE 802.1w compliant devices. Note: IEEE 802.1w is an updated version of the Spanning Tree protocol called Rapid Spanning Tree. The two types of STP protocols are compatible and 802.1w should revert to inter-operate with 802.1D devices (such as Sonos). Therefore, 802.1w Ethernet switches will work with Sonos ZonePlayers.

SONOS ZonePlayers CAN be connected to Ethernet switches that do NOT support Spanning Tree as long as the Ethernet switches do not interfere with the STP BPDU packets transmitted between ZonePlayers. This is typically never the case and these switches pass the BPDU packets like any other packet.

If the Ethernet switches that Sonos ZonePlayers are wired to DOES support Spanning Tree, the Spanning Tree on those switches must be configured properly. Ethernet switches that support Spanning Tree typically have their STP settings disabled. This also typically means that these switches will block/discard the BPDUs coming from the ZonePlayers. When the ZonePlayers are not able to see BPDUs, they cannot detect there is a shared transmission medium between the Zones and this will typically result in loops in the network. The solution to allow the use of these switches with Sonos is to enable and configure the Spanning Tree on the Ethernet switches. The configuration settings on each switch are different and the appropriate documentation for those products should be consulted. Note: Some switches have a setting that is called Pass BPDUs or equivalent. This setting when present allows the BPDUs between the ZonePlayers to pass freely through the switch without actually enabling STP on the the switch. Typically, setting this function also works, but again please review the switches product documentation.

A good guideline for Ethernet switches is if the switch says it supports Spanning Tree, either 802.1D or 802.1w, then its configuration settings and user documentation should be examined before wiring multiple ZonePlayers to the switch. If the switch does not state it supports Spanning Tree, 802.1D, or 802.1w, it will probably work fine with Sonos.

SONOS ZonePlayers do NOT require a connection to the same Ethernet switch. Different ZonePlayers can be connected to different Ethernet switches which are in turn connected to each other. The only requirement is that Sonos ZonePlayers must be able to actively participate in 802.1D Spanning Tree and not have BPDU transmission blocked between them. There is no Sonos limitation that prevents wiring multiple ZonePlayers to multiple Ethernet switches.

IEEE 802.1D has a recommended bridge span limitation of 7 bridges. This means that the total number of connected bridges from one end of the network to the other should not exceed 7 bridges. This typically only comes into play when daisy chaining Sonos ZonePlayers together by wiring one ZonePlayer to the next. In this case, the guidelines is when daisy chaining ZonePlayers, do not exceed 7 ZonePlayers wired together. If wiring multiple ZonePlayer to a single Ethernet switch, typically the number of spans will only be 3 or 4 (I.e. much less than 7). Except in the daisy-chain configuration, this limit of 7 bridges/7 ZonePlayers, is rarely ever hit.

A number of comments have used the term router and switch interchangeably in regards to this topic. Sonos ZonePlayers in the same HouseHold MUST be connected to the same routed network. A Spanning Tree cannot span two or more routed networks. In addition all Sonos ZonePlayers and Controllers must be on the same routed IP network in order to properly communicate and function. Typically, two or more routed networks are not seen in the household environment except by accident (Example. A carrier provides a new router in a network that already had a router and the original router was not removed).

Hopefully this information has clarified a number of items and not added additional confusion.

Regards, Todd
This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

53 replies

Lyricist III
March 17, 2016
Great news It has solved my problem.
The Matrix was very help full and I was lucky that the 2 players connected on the sonosnet wifi are close.
The Matrix is all green !!!

Love from PARIS to all of you !
inopinatus
Prominent Collaborator I
October 7, 2016
I have a Playbar (with sub & surrounds) and a Connect. Attaching the Playbar and the Connect to a Linksys GS308 (unmanaged) switch results in STP flapping, leading to audio stutter every couple of minutes. At these times I see (via /status/dmesg) the Connect flips between blocking and forwarding on ath0 (its wireless interface) whilst the playbar reports TCNs on both ath0 and eth0.

So the switch is not blocking STP BPDUs. And they show up in tcpdump off another port - in particular I can see both the Playbar and the Connect taking turns to spit topology change notifications at each other. It's not a pretty sight.

Disabling wireless on the Connect solves the problem, eliminates stutter, and leaves the Playbar as the root bridge.
uncooked meat prior to state vector collapse
ratty
October 7, 2016
At these times I see (via /status/dmesg) the Connect flips between blocking and forwarding on ath0 (its wireless interface) whilst the playbar reports TCNs on both ath0 and eth0.
A bad connection could account for the unstable topology. The wired CONNECT should never use anything but the switch as its root path. I would run continuous ping tests to PLAYBAR and CONNECT, and look for packet loss and/or excessive times.
inopinatus
Prominent Collaborator I
October 7, 2016
A bad connection could account for the unstable topology. The wired CONNECT should never use anything but the switch as its root path. I would run continuous ping tests to PLAYBAR and CONNECT, and look for packet loss and/or excessive times.


The wiring and switch are fast and stable. Ping floods, large file transfers, streaming 4K video, all no problem. Zero packetloss and low latency even on a long-running ping -f -s 1500.

This workaround is fine, just unsupported.
I am suspicious of Sonos's layer 2 behaviours, but I don't have the time to debug their STP interactions.
uncooked meat prior to state vector collapse
Enthusiast II
August 2, 2017
I had serious instability problems using a TP-Link switch ( TL-SL3428). What seem to have brought some stability is to increase the Max Learned MAC for the port(s) that have a wired LAN connection to the switch. In the switch web page go to 'switching' -> Port, Port Security tab and increase the max count. I found error messages in the log file indicating that the max no of mac entries was reached in the table for the port connected to the sonos.
If you have a wireless node ( I have a apple time capsule that I use the wireless node from) , increase the max for the port connected to that too.

I wish Sonos would spend a bit more time in qualifying a few major network switch vendors with their STP function and summarise STP config info in a decent white paper.
Regards Peter
Avid Contributor I
June 3, 2018
One really great feature that Sonos could add to the product is an advanced mode where the installer/user can specify which network interface each player is going to use, and that setting would override any automatic interface algorithm and would override any route based on path cost, and also disable any STP negotiation. Sometimes the "smart" part of the product may not be as "smart" as you'd like it to be, and the human knows better.
Stanley_4
Grand Maestro
June 3, 2018
I don't know if just specifying the interface alone would be sufficient, when using wireless each Sonos device has to pick which peer to connect to in the mesh. It might also be a pain when you go from wired to wireless operation of a speaker when you want sound in a temporary location, I do that often with one of my Play 1s.
Avid Contributor I
June 4, 2018
I don't know if just specifying the interface alone would be sufficient, when using wireless each Sonos device has to pick which peer to connect to in the mesh. It might also be a pain when you go from wired to wireless operation of a speaker when you want sound in a temporary location, I do that often with one of my Play 1s.

I see this advanced mode to be able to specify parameters like mesh peers, and not to make moving a player from wired to wireless ad.hoc. (if one wants to do that, they wouldn't use this mode). While I can only speak for myself, my Sonos players never move once I install them. Of course I've put a player or set of speakers connected to a player in almost every room of the house (including bathrooms and in the backyard) so I never have to move hardware around.
ratty
June 4, 2018
@Michael Bender

What problem are you trying to solve? An unstable topology? Although I've seen a few occasions where a central node is hit by a TCN flood they're rare.

SonosNet/STP typically gets things right. It already triggers the blocking of nonviable wireless tunnels, by assigning an artificially high path cost.

Also, don't overlook the fact that the spanning tree is not the only active topology. Direct Routing is used to interconnect grouped/bonded nodes, effectively short-cutting between tree branches.
Stanley_4
Grand Maestro
June 4, 2018
A lot of fancy stuff could be done but doing it may mean doing other stuff that more people will want to use has to be left out. Remember that Sonos devices have limited storage and memory (older one even more limited) so you can't have everything and have to prioritize.