Sonos and the Spanning Tree Protocol

  • 10 June 2010
  • 60 replies
  • 131500 views


Show first post
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.

60 replies

Hey MikeV what's the chances of improving SonosNet to understand the STP path metrics the rest of the world has moved onto?

I've been buying Sonos gear for 10 years and am up to 9 zones in my house and love it; you make seriously the best working and least troublesome consumer electronics in the entire market. There are other companies with a reputation for "it just works" but they can't hold a candle to Sonos. EXCEPT for this dratted STP issue which has cost me hours of troubleshooting on multiple occasions. I used to have dumb switches and they work fine because there was no other STP in the mix and I didn't know what STP was and didn't have to. I upgraded my network to a low-end Cisco switch and everything broke, after quite a bit of troubleshooting I realized this was the cause and there was a way to tell the Cisco switch to use the old path costs, problem solved. Except this year I upgraded my network to an overall much nicer Ubiquiti Unifi switch, and the problems were a lot more subtle which meant they were a lot harder to track down but once again it turns out to be my good friend, conflicting STP path costs.

So now I have this fancy switch (Unifi) and this fancy self-configuring mesh network (Sonos) and they have incompatible STP implementations and neither one can be configured because in the modern world you're not supposed to configure things.

Well. So now I get to either unplug ethernet from all but 1 of my Sonos zones so SonosNet has no loops back onto my wired LAN (but then I might be subject to wireless interference), or unplug ethernet from ALL of my Sonos zones so they join my normal WiFi network, or play around with selectively disabling wireless on only some Sonos zones (all of these leave me more exposed to the vagaries of WiFi than I want to be), or figure out how to disable STP entirely on the Unifi switch, which is apparently possible but not easy.

It would be really really nice if Sonos STP played nice with the rest of the modern world, though, pretty please?
I guess there's nothing to stop Sonos factoring all path costs -- wired and wireless -- by 20000, unless there's a 16-bit/65k limit in there somewhere. Given their redoubled focus on new, streaming customers -- most presumably connected via WiFi ('Standard Setup') -- in order to remain profitable, they might not feel that such tweaks are of the highest priority.
Charlie, what is the model of network switch that you have? There are some unmanaged switches that block STP, though they are not common.

Deactivating the wireless on your wired Sonos players might also work, but leave it enabled on only one of them, so any wireless players can still connect.
----------
French Translation from Google... Hopefully it's accurate. :)

Charlie, ce qui est le modèle de commutateur de réseau que vous avez? Il y a des commutateurs non administrables qui bloquent STP, si elles ne sont pas communs.

Désactiver le sans fil sur vos lecteurs Sonos câblé pourrait également fonctionner, mais le laisser activé sur un seul d'entre eux, de sorte que tous les joueurs sans fil peuvent toujours se connecter.


Hey Mike thank's for your french !
The switch is a TL-SG108 from TP-LINK.
Actually I have the ORANGE livebox fiber modem and router. Than My NAS connected directly to the modem router, than the TL-SG108 (8 ports) to the router and another 5 ports Switch from TP link (the same as the 8 one).
my Imac connected to the router directly too.

Connected to the 8 ports I have 2 player 5, and 1 player 3 (and direct to one of the player five a Samsung connected TV in the dinnig room)
Connected to the 5 ports I have 1 connected samsung TV in the living room, 1 TV box from ORANGE, 1 sonos connect
Connected to the wifi I have a player 1 and ipad, macbook, etc....

As an example of my problem yestarday when I wanted to cast a movie from my NAS to my TV in the living room, I couldn't see the DNLA TVMOBILI that I use .
So I had to unplug the RJ45 connected to the swtich 5 ports and plug it again and it suddently found the network and the DNLA on the TV.
But this morning 0 SONOS woke me up and they are supposed to wake us up;
So I shut down the PLayer in the dinnig room and put it on again and all rooms where available again on the controler of the Ipad.

So everything is working but barely never all together. I alaways have to unpluged, reboot, plug again in order to make work the needed device.

Nothing is stable.

Merci for you help.

If you visit PARIS you are more than welcome for a drink !

Charles
Userlevel 3
Badge
Until Sonos brings their STP up to modern standards, the only thing you can really do is disable wireless on nodes connected via Ethernet. Use the network monitor to determine which of your wired nodes has the best wireless coverage to your wireless Sonos devices, and leave wireless enabled on that one device. If it ever has problems, you'll lose all your wireless Sonos devices, but you will know where to look to trouble-shoot.

(This is the approach I have had to take, since Sonos's STP doesn't play nice with the modern STP on my Cisco switches. Only my Playbar has wireless enabled to feed a Play3 that I cannot easily hardwire. The rest of my Sonos devices are connected via Ethernet and have had wireless disabled to get them to work properly.) Disabling wireless also saves a couple watts of power when the unit is 'standby' mode.

Info on disabling wireless here: https://bsteiner.info/articles/disabling-sonos-wifi
Until Sonos brings their STP up to modern standards, the only thing you can really do is disable wireless on nodes connected via Ethernet. Use the network monitor to determine which of your wired nodes has the best wireless coverage to your wireless Sonos devices, and leave wireless enabled on that one device. If it ever has problems, you'll lose all your wireless Sonos devices, but you will know where to look to trouble-shoot.

(This is the approach I have had to take, since Sonos's STP doesn't play nice with the modern STP on my Cisco switches. Only my Playbar has wireless enabled to feed a Play3 that I cannot easily hardwire. The rest of my Sonos devices are connected via Ethernet and have had wireless disabled to get them to work properly.) Disabling wireless also saves a couple watts of power when the unit is 'standby' mode.

Info on disabling wireless here: https://bsteiner.info/articles/disabling-sonos-wifi


Thks but I have only 1 zone with no ethernet so can I let only this Player with wifi and the others disabled ? Would I still be able to manage all the players with the IPAD ?
I am pretty sure that my only player connected to the wifi is connected direclty to the router it is quite close enough
What do you think ?
Userlevel 3
Badge
Sonos does not support Ethernet and personal WiFi at the same time. E.g., if you have two Sonos devices, and configured Sonos to connect to your home WiFi, and then connect one of them to Ethernet, Sonos will NOT use your personal WiFi. It will turn the device you connected to Ethernet into a SonosNet Bridge and then the other wireless device will attempt to connect to that instead of your personal WiFi. So then the connectivity problems with the wireless node become an issue of how far/what is the signal quality between it and your wired Sonos device? In this case, if you can't get Ethernet to the wireless zone, then you might be better off disconnecting Ethernet from the wired zone and letting them both use your personal WiFi instead of SonosNet, since it sounds like you only have two Sonos devices so WiFi bandwidth shouldn't be an issue.

Or am I still miss-understanding your zone configuration?
I have described my zones in a post above to Mike V.
I have 5 zones :
4 on ethernet
1 on wifi with no possibility to put it on ethernet.
If I disable the wifi on the 4 players connected to ethernet the last one will not be able to get the home wifi ?
Userlevel 3
Badge
No, you misunderstood my original response then. You disable WiFi on all but one of the wired nodes. Use the network matrix in :1400/support/review to determine which wired node has the strongest wireless signal to the one wireless node Leave WiFi enabled on that device and disable it on all the other wired devices.
ok but if I want to let the wifi on only one I need to do it on the one not ethernet connected
Userlevel 3
Badge +1
I have just commissioned a Ubiquiti UniFi UC-CK Hybrid Cloud Key Controller and the first of several UAP-AC-PRO wireless access points. Very impressed, love the Controller software's visibility into my WLAN status, and would aspire to migrate towards a 100% Ubiquiti network solution. That means adding a Gateway (USG or USG-PRO-4) and a Switch. In my case, a US-24-250W model would be good enough. Its PoE+ would provide power for the UAPs, the Cloud Key Controller, and a possible future IP camera. Fans are apparently quite noisy, what say you metamatt?

But like metamatt, I realise that my extensive Sonos (8 zones now, with another unboxed PLAY:1 to add later) is likely to encounter STP issues. For now I have a new Cisco RV325 Router and an SG110-16HP Switch to wire in. Don't anticipate any STP issues arising, as all the wired Sonos ZPs and SUBs will be on the Router's integral "dumb" switch ports. Sonso Support say this will be fine. However I will be monitoring this thread with interest to see if a UniFi workaround emerges!

Might ask Ubiquiti Support exactly what the CLI tweak does. If it simply turns off active STP and enables BPDU flooding instead, I am advised by my friend that this should be OK. The tweak means getting into the switch using ssh, or Secure Socket Shell, a Unix-based command line technique. Not for the faint-hearted I suspect!
Userlevel 3
Badge
ok but if I want to let the wifi on only one I need to do it on the one not ethernet connected
No, you need ONE Sonos device with both Ethernet and WiFi enabled. The WiFi-only device, of course, needs WiFi enabled. All the other Ethernet-connected devices need WiFi disabled.
ok I get it
so on my 5 devices
3 will be only ethernet
1 will be ethernet and wifi
1 will be wifi only
Is that correct ?
Userlevel 7
Badge +21
ok but if I want to let the wifi on only one I need to do it on the one not ethernet connected

The confusion here is using the term "WiFi" when it really should be "wireless"... SonosNet wireless is not WiFi.

Your Play:1 is not connected to your ORANGE WiFi. It's connected to one of your wired Sonos players. If you disable wireless on all of your wired zones, then the Play:1 is out there on its own. Because you have Sonos zones that are wired to your network, the one wireless zone cannot connect to your ORANGE WiFi network. It will need to connect to another Sonos player. This is why you leave one wired Sonos player with its wireless connection enabled.
ok but if I want to let the wifi on only one I need to do it on the one not ethernet connected

The confusion here is using the term "WiFi" when it really should be "wireless"... SonosNet wireless is not WiFi.

Your Play:1 is not connected to your ORANGE WiFi. It's connected to one of your wired Sonos players. If you disable wireless on all of your wired zones, then the Play:1 is out there on its own. Because you have Sonos zones that are wired to your network, the one wireless zone cannot connect to your ORANGE WiFi network. It will need to connect to another Sonos player. This is why you leave one wired Sonos player with its wireless connection enabled.

gotcha !
so it is not possibile to have only one Sonos player with no ethernet connexion available?
Userlevel 7
Badge +21
ok I get it
so on my 5 devices
3 will be only ethernet
1 will be ethernet and wireless
1 will be wireless only
Is that correct ?

This is correct.

And I fixed it because your Sonos players are not connecting to your ORANGE WiFi. They are connecting to each other directly.
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 !
Userlevel 4
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.
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.
Userlevel 4
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.
Userlevel 4
Badge +1
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.
Userlevel 2
Badge
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.
Userlevel 7
Badge +21
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.
Userlevel 2
Badge
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.
@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.
Userlevel 7
Badge +21
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.