Skip to content
All articlesNetwork

Getting Sonos and AirPlay working across VLANs

Your speakers are on the IoT network, your iPhone on the main network, and AirPlay sees nothing. The fix, without throwing it all back into one network.

Published
Reading time
3 min read
Level
Advanced
Tested on HA
2026.10
Lees in het Nederlands

After splitting your network into a separate IoT VLAN, Sonos is the first thing to complain. The app still finds your system, but AirPlay on your iPhone no longer lists the speakers, and sometimes Home Assistant loses the connection on top of that. This is not a bug. This is multicast stopping neatly at the VLAN boundary, exactly as you configured it.

Why it goes wrong

AirPlay announces receivers over mDNS (Bonjour), and those are multicast messages that a router does not pass between VLANs by default. Sonos additionally uses SSDP to find its own system. Two protocols that both assume everything lives on one network.

The clean fix

  1. Put every Sonos speaker in the same VLAN as Home Assistant. Speakers spread across multiple networks always cause grouping problems, and no firewall rule will fully sort that out.
  2. Enable mDNS forwarding between the main network and the IoT network. In UniFi it is called Multicast DNS. With an mDNS proxy you can narrow it to _airplay._tcp and _raop._tcp.
  3. Firewall rules: allow traffic from the main network to the speakers. AirPlay streams over shifting TCP and UDP ports, so restrict by the speakers' IP addresses here rather than by port.
  4. IGMP snooping: leave it on, but check that multicast is not being blocked inside the IoT VLAN anyway.

You do not need a relay

You will find advice online about running a relay container or putting a second network card in your HA machine. You do not need it. With your speakers and HA in one VLAN and mDNS forwarded deliberately, it works without extra moving parts you will have forgotten about in a year.

Testing

  • Open the AirPlay menu on your iPhone. Do you see all the speakers?
  • Group two speakers in the Sonos app and play something.
  • Have HA play a notification (tts.speak or media_player.play_media) and check that the speaker returns to whatever it was doing.

If AirPlay works but HA does not, it is nearly always a firewall rule between the IoT network and HA, in one direction or the other.

Frequently asked questions

Do I have to use the Sonos app on the IoT VLAN as well? No. With mDNS forwarding and the right firewall rules the app finds your speakers from the main network just fine.

Why has grouping stopped working? Almost always because your speakers sit in different VLANs. Put them all on the same network and the problem goes away.

Does Spotify Connect still work? Yes. Spotify Connect finds the speaker through the cloud, so it is largely unaffected by VLANs, as long as your speakers can reach the internet.