UniFi networking

UniFi · Networking

Chromecast, AirPlay and Sonos vanish across UniFi VLANs — the mDNS fix

First published 27 October 2026 · Updated on 27 October 2026 · Verified against Ubiquiti Help Center documentation (links at each step)

Merroway Editorial · Verified against governing standards and vendor documentation.

The fast answer

Do not flatten the VLANs to fix this. The fix is two parts, and both are needed: first enable Multicast DNS between the two networks so discovery announcements cross the VLAN boundary, then check the firewall — under the Zone-Based Firewall, discovery working does not mean control traffic is allowed. If the device appears but will not play, the second part is what is missing. See also UniFi VLANs for a small business for the segmentation this guide builds on.

Advertisements

What you are looking at, in plain words

Chromecast, AirPlay, Sonos, Spotify Connect and many printers do not find each other by address — they announce themselves with mDNS (Multicast DNS), a link-local discovery protocol. Link-local means the announcements stay inside one network segment by design: they do not cross a VLAN boundary on their own. That is a feature when you want isolation, and a problem the day you segment the devices that need to be found.

Ubiquiti's answer is the mDNS proxy: the gateway forwards mDNS traffic between selected networks so devices can be discovered across VLANs. Ubiquiti's Switch Settings documentation describes it exactly that way — it forwards mDNS traffic (AirPlay, AirPrint, Bonjour, Chromecast, media servers) between selected networks, and it requires a UniFi gateway. It offers two modes: All, which forwards all mDNS traffic, and Auto, which forwards a predefined list of common services — including AirPlay, Chromecast, Sonos and Spotify Connect. Auto is the right starting point for most small businesses: it shares the services people actually cast to, without rebroadcasting everything.

The part most short guides skip: discovery is only half the connection. Once the phone learns the speaker exists, the phone still has to talk to it — and under the Zone-Based Firewall, that control traffic crosses a zone boundary and needs its own allow rule. A device that appears in the cast list but refuses to play has usually passed step one and failed step two.

Step 0 — Prove which part is failing

Before touching settings, prove the boundary is the problem. Put the phone and the speaker on the same network (temporarily move one of them) and try casting. If it works on one network and fails across the VLANs, you have proved the VLAN boundary — not the speaker, not the phone, not the app — is the fault. If it fails on the same network too, fix that first: no mDNS setting will rescue a device that does not announce itself at all.

Note which networks are involved (for example, main network and IoT network) and which service is failing (AirPlay, Chromecast, Sonos) — the mDNS proxy settings are per-network, so you need both names.

The fixes, in order

  1. Enable Multicast DNS on both networks. In the console, open Settings > Networks and the global network settings for Multicast DNS, and enable mDNS for the two networks involved — the network the controlling device is on and the network the speaker, TV or printer is on. Enabling it on only one side does not forward announcements in both directions. Apply the change and give the gateway a moment to provision.
  2. Start with the Auto service list. Set the mDNS proxy to Auto first. Auto forwards the predefined common services — AirPlay, Chromecast, Sonos, Spotify Connect, printers and others — which covers the casting cases in this guide. Switch to All only if a specific service still does not appear and you have checked the firewall step below; All rebroadcasts everything, which is more traffic and more exposure than most businesses need.
  3. Allow the control traffic between the zones. Now test: if the device appears but will not connect or play, the firewall is blocking the control traffic. Under the Zone-Based Firewall, add an allow rule for traffic from the controlling network to the device network for the service in question, and make sure established return traffic is allowed. Keep the rule narrow — the controlling network to the device network, not a blanket allow between the zones — so the IoT network stays isolated for everything else.
  4. Test one platform at a time. Test AirPlay from a phone, then Chromecast from an app, then Sonos from its controller — one at a time, noting which works. Different platforms use different service announcements, so a blanket “casting works” test hides the one platform that still fails. If one platform works and another does not, re-check the mDNS service list for that platform before changing anything else.
  5. Keep the guest network out of it. Do not enable mDNS on a guest network to fix a casting problem. Guests do not need to discover internal speakers and printers, and sharing discovery with a guest network undoes part of the isolation the VLAN was built for. Fix casting between the main and IoT networks, and leave guest discovery off.

Prove it worked

From the phone on the main network, open the cast or AirPlay list and confirm the device appears, then actually play something to it for a minute — appearance alone is not proof, as step 3 explains. Repeat from a second controlling device if the business relies on more than one. If the device appears and plays, both halves of the fix are in place.

Still not working? Work this ladder in order

  1. Device does not appear at all: re-check that Multicast DNS is enabled on both networks, and that the mDNS proxy mode covers the service (Auto covers the common casting services; All covers everything).
  2. Device appears but will not play or connect: the firewall is blocking control traffic. Revisit the zone allow rule — discovery succeeded, control did not.
  3. Works from one phone but not another: the failing phone is on a different network (or a guest network) from the working one. Check which network each device is actually on.
  4. Worked, then stopped after a change: a network edit, a zone change, or a gateway update can reset proxy or firewall settings. Re-check the mDNS setting and the zone rule before rebuilding anything.
  5. Everything appears but playback stutters: that is a Wi-Fi or bandwidth problem, not a discovery problem. Do not keep widening mDNS or firewall rules to chase a signal issue.
  6. None of these steps fixes it. Take the results of Step 0 and the failing step above to Ubiquiti Support via the Ubiquiti Help Center (the official documentation linked in Sources above) — that is the next step, not a different vendor's forum thread.

Mistakes that make it worse

  • Flattening the VLANs (moving everything back to one network) to restore casting.
  • Enabling mDNS on the guest network as well as the internal networks.
  • Switching the proxy to All before checking the firewall — and leaving it there.
  • Treating “the device appears” as proof, when playback is the actual test.
Advertisements

FAQ — the issues behind this problem, answered

Why did casting break the day I created the IoT VLAN?

Because mDNS discovery is link-local: announcements stay inside one network segment. Moving the speaker to its own VLAN moved it outside the phone's discovery range. The mDNS proxy exists to forward those announcements between selected networks.

What is the difference between Auto and All in the mDNS proxy?

Auto forwards a predefined list of common services (AirPlay, Chromecast, Sonos, Spotify Connect, printers and others). All forwards all mDNS traffic. Start with Auto; use All only for a specific service that Auto does not cover.

The speaker appears in the cast list but will not play. Is mDNS still broken?

No — discovery worked. The control traffic after discovery is being blocked, which under the Zone-Based Firewall means the zone allow rule is missing or too narrow. Fix the firewall rule, not the mDNS setting.

Do I need a UniFi gateway for this, or will access points alone do it?

A UniFi gateway is required: the mDNS forwarding described in Ubiquiti's documentation is a gateway function between networks, not something access points do on their own.

Sources

Ubiquiti Help Center — UniFi Switch Settings (mDNS and mDNS Proxy: All vs Auto, service list) · Merroway — UniFi VLANs for a small business (the segmentation this guide builds on). mDNS itself is defined by RFC 6762 (link-local multicast discovery).

Verification note: values, settings paths and limits on this page were checked against the official pages listed above on 27 October 2026. Anything that could not be verified in an official source was left out rather than stated as fact.