Sonos and MikroTik VLAN

I was having an issue segmenting Sonos on a VLAN using Mikrotik.

This is because Sonos relies on UPNP and Multicast on address 239.255.255.250 which is not broadcasting over segmented nets.

It turns out you need to add the multicast package to Mikrotik and reboot.

You can download it here choosing your current version and cpu architecture

https://mikrotik.com/download

Version and packages can be found by running /system package print

Architechture can be found by running /system resource print

Enable Upnp on the respective interfaces

Then you can configure PIM using the following config:
(PIM = Protocol Indepentend Multicast)

:global ifControl “The interface your Sonos app is connected to”
:global ifSonos “The interface Sonos speakers is connected to”
:global netControl “10.0.1.0/24 -the subnet your Sonos app is on"
:global plcBefore “6 -the placement of FW rules"

/routing pim interface
add interface=$ifSonos
add interface=$ifControl

/ip firewall filter
add chain=forward comment="Forward Sonos multicast traffic" dst-address=239.255.255.250 place-before=$plcBefore
add chain=forward comment="Forward Sonos remote control events to players" in-interface=$ifControl out-interface=$ifSonos dst-port=1400,4444 protocol=tcp place-before=$plcBefore
add chain=forward comment="Forward Sonos remote control events from players" in-interface=$ifSonos out-interface=$ifControl dst-port=3400,3401,3500 protocol=tcp place-before=$plcBefore
add chain=forward comment="Forward Sonos UPnP device discovery events from players" in-interface=$ifSonos out-interface=$ifControl dst-address=$netControl dst-port=1900,1901 protocol=udp place-before=$plcBefore

/system script environment
remove [find name="ifControl"]
remove [find name="ifSonos"]
remove [find name="netControl"]
remove [find name="plcBefore"]

More articles

Optional features

Check available optional features: DISM /Online /Get-Capabilities Install an optional feature: DISM /Online /Add-capability /capabilityname:Media.MediaFeaturePack~~~~0.0.1.0

Read More »

AD retention period

Check AD retention tombstone value: Import-Module ActiveDirectory $ADForestconfigurationNamingContext = (Get-ADRootDSE).configurationNamingContext $DirectoryServicesConfigPartition = Get-ADObject -Identity “CN=Directory Service,CN=Windows NT,CN=Services,$ADForestconfigurationNamingContext” -Partition $ADForestconfigurationNamingContext -Properties *

Read More »