Support Downloads Community

UniFi Video is an obsolete product line.

This application and its related devices will no longer receive any manner of technical support, including functional and security updates. Additionally, there will be no further updates to Help Center content pertaining to UniFi Video.

UniFi - Best Practices for Managing AirPlay/Chromecast on UniFi Network


This article will explain best practices for configuring your UniFi network with AirPlay/Chromecast devices. In order to operate efficiently, larger networks with more than 100 WiFi clients require the multicast block option to be enabled. This guide is especially useful for schools or other similar networks that need to enable multicast block while still providing access to AirPlay and Chromecast devices on the network.

NOTES & REQUIREMENTS:This guide assumes the use of a UniFi Security Gateway or UniFi Dream Machine. If your network does not, some of the steps below may not apply. 

Table of Contents

  1. Introduction
  2. Create a Separate SSID/VLAN
  3. Enable MulticastDNS Service
  4. Connect AirPlay/Chromecast to your new SSID
  5. Test Streaming/Discovery
  6. Related Articles


Back to Top

This article will explain how to configure your UniFi network so you can enjoy the benefits of these devices while limiting any potential impact from exposing "trusted devices" on the same LAN. It may also be desired to add firewall rules to block traffic between the "trusted LAN" and the LAN that is chosen for the AirPlay/Chromecast devices. 

In some cases, both AirPlay and Chromecast rely on wireless connectivity to access media and stream it from local wireless clients to these media devices. To see which ports are needed to be open between networks please reference the application documentation. The article cannot provide a list for every service. 


Some key considerations:

  • How will local wireless clients discover the AirPlay/Chromecast devices?
  • How can I segment traffic to prevent broadcast/multicast traffic related to the operation of these devices from adversely affecting other users?
  • How can I ensure that devices on my network can access these services without difficulty?

This article will discuss some recommended configurations of your UniFi network when using these devices.

Create a Separate SSID/VLAN

Back to Top

To help segment and isolate traffic related to your AirPlay and Chromecast devices, it is recommended to put these devices on a separate VLAN. This is possible with the use of the USG or UDM MulticastDNS reflector service that helps devices discover devices like Chromecast.

  1. First, let’s walk through how to set up a VLAN in the UniFi Network application. Follow these steps:
    1. Go to Settings > Networks.
    2. Click "Create New Network".
    3. Select "Corporate" network type.
    4. Assign a VLAN# to your network: in this example 55.
    5. Define the DHCP scope--e.g.
    6. Select Update DHCP Range.
    7. Enable IGMP Snooping as it can help with multicast traffic (a UniFi Switch is needed for this, see our feature matrix, if not available skip).
    8. Configure any other desired settings and click "Save".


  1. Next, create a dedicated SSID for your AirPlay/Chromecast and other IoT devices and assign it the proper VLAN:
    1. Go to Settings > Wireless Networks > Create Wireless Network.
    2. Enter a name for your new wireless network i.e. “TestIoT”.
    3. In most cases, you'll want to select WPA Personal for Security Type.
    4. Enter a secure Security Key that can be used to authenticate to this network.
    5. Assign the VLAN ID associated with the network created earlier, by clicking "Use VLAN" checkbox, and entering the number associated with the VLAN, in this example 55.
    6. Enable Multicast Enhancement (IGMPv3).
    7. Click "Save" to finish.


Enable MulticastDNS Service

Back to Top

3. Next, we need to enable the Multicast DNS service in the Network application to ensure that the devices are able to discover the AirPlay/Chromecast devices without issue. To do so: 

3.1. Navigate to Settings > Services > MDNS

3.2. Switch the “Enable Multicast DNS” button to ON

3.3. Select Apply Changes.



  • Enabling the mDNS feature will enable a service on the USG that will reflect (mirror) mDNS packets into all other networks including WAN.
  • The UDM does not forward these packets out of the WAN interface(s). 

Connect AirPlay Device / Chromecast to New SSID

Back to Top

After you have completed the above steps, you have configured everything necessary in UniFi. All that is then needed is to connect your AirPlay/Chromecast devices to your new SSID associated with the new VLAN.

NOTE:The following instructions are just general steps to follow. Please use Google's help guides to configure Google devices for the most current instructions. You can start here: Change the Wi-Fi network of Chromecast or Chromecast Audio.

4. To do this, open the “Home” app made by Google. Select the device you wish to configure, and then forget the network.

4.1. Click Forget next to the previous Wi-Fi Network, then Forget Network to confirm.

4.2. You will then need to set up the Chromecast and connect to the new SSID you created.

4.3. After you have finished adding the new network, you should be ready to test streaming on your Chromecast. 

Test Streaming and Discovery

Back to Top

To confirm everything is working, test Chromecast by connecting a wireless client like a laptop or mobile device to your original SSID, the one that your Chromecast is not connected to.

Once connected, open a video on a site like YouTube, and click the Chromecast button in the top right.


If you have set up everything properly, you should then see your Chromecast device listed as shown below. Select the proper Chromecast device and enjoy streaming!


Use a similar method to test proper discovery and audio streaming to a Google Home device as well. 

Verify that the mDNS Reflector is Working Properly:

1. SSH into the USG or UDM. 

2. Use tcpdump to capture packets on the destination LAN.

sudo tcpdump -npi eth1.15 port 5353
NOTE:The interface will need to be changed based on the interface and VLAN used for client devices. The scheme works as interface.VLAN_number. The VLAN to look into is the one with the clients that wish to cast. The example above was for a LAN network on eth1 and VLAN 15. Port 5353 is used for Bonjour services/discovery.

Verify that the port 5353 packets are reaching the VAP:

1. SSH into a UniFi Access Point (UAP) in your network.

2. Use tcpdump to packet capture on the AP

sudo tcpdump -npi ath# port 5353
NOTE:To find the BSSID, navigate to the WLANs section in Overview on the AP property panel. It should be ath0/ath1/ath2, etc. 

In both of these tcpdump captures you should be able to see the devices, along with speaker groups advertised. If not, try capturing from the LAN where the AirPlay/Google devices are located. If it's not showing up there, then either the capture was incorrect, or there is another fundamental issue at play. 

NOTE:Sometimes client devices such as Android/iOS devices need to be rebooted in order to see the devices/groups shortly after new network configuration.

Related Articles

Back to Top

UniFi - Managing Broadcast Traffic

UniFi - USW: Using VLANs with UniFi Wireless, Routing & Switching Hardware

Intro to Networking - How to Establish a Connection Using SSH

Was this article helpful?
224 out of 318 found this helpful