Community discussions

MikroTik App
 
unlikely
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Fri Feb 21, 2020 1:16 pm

Sonos Across VLANs in 2024

Fri Jan 26, 2024 12:35 am

Read all old questions and answers about about SONOS across VLANs but I wonder if somthing has changed in the past years at the level of ROS7 and/or SONOS firmware.

Basically I would like to put SONOS speakers in one VLAN and PCs/Smartphones with SONOS app in another VLAN. I tried with the following PIM/SM configuration but SONOS app cannot find speakers.
/routing pimsm instance
add afi=ipv4 disabled=no name=pimsm-default vrf=main
/routing pimsm interface-template
add disabled=no instance=pimsm-default interfaces=\
    vlan-speakers,vlan-controller
At the moment no firewall block inter-VLAN routing. I can ping the speakers, and I can query the REST endpoint.

I also tried with a more basic IGMP proxy with no luck.

Hardware is a CCR2004 with ROS v7.12.
 
rplant
Member
Member
Posts: 316
Joined: Fri Sep 29, 2017 11:42 am

Re: Sonos Across VLANs in 2024

Fri Jan 26, 2024 1:48 am

Sorry, no actual answer but the following couple of links might be helpful.

viewtopic.php?t=194842&sid=9823878ca8fa ... 9452b2a5de

https://www.packetmischief.ca/2021/08/0 ... n-network/
 
blighterfog
just joined
Posts: 1
Joined: Thu Mar 07, 2024 4:04 am

Re: Sonos Across VLANs in 2024

Thu Mar 07, 2024 4:08 am

Read all old questions and answers about about SONOS across VLANs but I wonder if somthing has changed in the past years at the level of ROS7 and/or SONOS firmware.

Basically I would like to put SONOS speakers in one VLAN and PCs/Smartphones with SONOS app in another VLAN. I tried with the following PIM/SM configuration but SONOS app cannot find speakers.connections game
/routing pimsm instance
add afi=ipv4 disabled=no name=pimsm-default vrf=main
/routing pimsm interface-template
add disabled=no instance=pimsm-default interfaces=\
    vlan-speakers,vlan-controller
At the moment no firewall block inter-VLAN routing. I can ping the speakers, and I can query the REST endpoint.

I also tried with a more basic IGMP proxy with no luck.

Hardware is a CCR2004 with ROS v7.12.
Have you tried using a VPN?
Last edited by blighterfog on Tue Mar 26, 2024 6:32 am, edited 1 time in total.
 
gotsprings
Forum Guru
Forum Guru
Posts: 2141
Joined: Mon May 14, 2012 9:30 pm

Re: Sonos Across VLANs in 2024

Fri Mar 08, 2024 2:12 am

This works on my bench...
/routing pimsm instance
add disabled=no name=pimsm-instance1 vrf=main
/routing pimsm interface-template
add disabled=no instance=pimsm-instance1 interfaces=bridge,Guest
 
unlikely
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Fri Feb 21, 2020 1:16 pm

Re: Sonos Across VLANs in 2024

Fri Mar 08, 2024 11:28 am

Have you tried using a VPN?
After my initial questions, I was finally able to makes Sonos system work across VLANs.
Was working also across a Wireguard VPN!

Unfortunately, in the past week, despite still working with PC/Mac desktop app, is not more workin on mobile Android/iOS app, not even locally.

Any idea?
Last edited by unlikely on Sat Mar 09, 2024 2:58 am, edited 1 time in total.
 
gotsprings
Forum Guru
Forum Guru
Posts: 2141
Joined: Mon May 14, 2012 9:30 pm

Re: Sonos Across VLANs in 2024

Sat Mar 09, 2024 12:34 am

I have used an iphone and android phone on the main network and reached the Sonos network.

Wireguard... wait... if you are not on WiFi... sonos will not connect at all on phone interfaces.
 
unlikely
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Fri Feb 21, 2020 1:16 pm

Re: Sonos Across VLANs in 2024

Wed Apr 10, 2024 12:23 pm

I think I've made some interesting progress and discoveries. Currently the Sonos system is correctly and stably identified by the controllers in distinct VLANs.
I report my experience and apologize for having used an online translator.

To give a little context, I would like to point out that my network is broadly composed of a Mikrotik CCR2004, a UniFi Aggregation Pro, and several other UniFi switches and Access Points. Currently there is only a 2x SFP+ bonding connection between the CCR and the aggregation: all VLANs travel tagged on this bond; the CCR ethernet ports are unused. The other switches are connected to the aggregation and the Access Points to the other Switches.

Basically, a single bridge is configured on the CCR with the aforementioned bond as a port, with vlan-filtering enabled and various vlan sub-interfaces. A few months ago a WAN Failover with 2 ISPs was configured (based on viewtopic.php?t=157048) and recently the WAN Load Balancing with 3 ISPs. The firewall is based on the official Mikrotik documentation (https://help.mikrotik.com/docs/display/ ... d+Firewall) with various modifications for specific needs and to implement some queues; it currently does not provide any traffic restrictions between “trusted” VLANs.

There are a total of 10 Sonos speakers of the S2 version and they are connected to a common wifi network, but a specific dedicated VLAN is assigned to them via radius. Sonos controllers are wired and wifi and reside in two other VLANs. Some controllers are connected via Client-to-Site and Site-to-Site VPN via Wireguard tunnels installed on the CCR.

The VLAN segregation was made around last January and thanks to PIM/SM the Sonos system initially worked quite stably, only requiring authorization of multicast traffic between the trusted VLANs. Recently, however, more or less all local controllers have begun to have difficulty identifying the Sonos system. It seemed that system detection was difficult when two particular speakers had an unstable WiFi connection. In recent days, the system had become practically impossible except from a smartphone placed in the same VLAN as the speakers. Curiously, however, the controllers connected via Wireguard have never had any difficulties.

What I think I understood is the following.

1. After initial discovery of the system via multicast/SSDP, the controller “associates” with a particular speaker (visible in app settings) and can continue to communicate with the system via unicast and control the system even in the absence of routing multicast, at least for a certain period and if the associated speaker remains reachable on the network. This would be the reason why the wireguard remote clients, initially associated with speakers with a stable connection, have always worked and why the local clients, associated with speakers with an unstable connection, have had problems.
2. The behavior of the UniFi system regarding multicast has changed for some time. The description in the UniFi console suggests that IGMP snooping would be an optimization for multicast, in reality it now seems like a real necessity for forwarding multicast traffic. Even if all UniFi networks have snooping disabled, even if IGMP snooping is disabled in the CCR bridge, SSDP multicast traffic is not flooded to the speaker network, at least not M-SEARCH from the controller network . If IGMP snooping is activated on a UniFi network, the aggregation takes on the role of IGMP querier (this is what the CCR reports). On the CCR, IGMP snooping is actually an optimization and can be activated or deactivated: however, if it detects an external querier, the CCR will not send queries regardless of the settings.

To conclude, I believe I can conclude that the problems I had were not so much in the configuration of the Mikrotik CCR but in the configuration of the UniFi system, probably altered by an update of the same which initially went unnoticed for the reasons referred to in point 1 above.

Who is online

Users browsing this forum: DollarHat, Renfrew and 42 guests