Edgerouter and Chromecast

Chromecast crossing subnets

This article is based on a long threadΒ in the ubnt forums, but I just boiled it down to making it work in my environment… It’s a continuation of my Edgerouter Security series.

Clients use mDns (a dynamic decentralized dns mechanism) to find the Cromecast. The Edgerouters mdns repeater needs to be enabled on the interface with the Chromecast and also the interfaces with the devices talking to the Chromecast.

set service mdns repeater interface eth3.30
set service mdns repeater interface eth3.40

We now need to punch a hole in the firewall to the interfaces with the mDns repeater.

set firewall name PROTECT_LOCAL rule 30 action accept
set firewall name PROTECT_LOCAL rule 30 description 'Accept mdns'
set firewall name PROTECT_LOCAL rule 30 destination port 5353
set firewall name PROTECT_LOCAL rule 30 protocol udp

Now we need an UDP broadcast relay service. Britannic in the ubnt forum has made a nice package that is easily installed on the Edgerouter. It can be downloaded here:Β https://community.ubnt.com/ubnt/attachments/ubnt/EdgeMAX/67208/1/ubnt-bcast-relay.tgzΒ . The following commands installs it.

tar -xvzf ubnt-bcast-relay.tgz
chmod 755 install.sh

Then it needs to be set up for the interfaces. Devices talking to the Chromecast use UDP port 1900 broadcasts.

set service bcast-relay id 1 description 'Chromecast relay'
set service bcast-relay id 1 interface eth3.30
set service bcast-relay id 1 interface eth3.40
set service bcast-relay id 1 port 1900

Now our devices can talk to the Chromecast πŸ™‚

10 thoughts to “Edgerouter and Chromecast”

  1. Thanks for writing this up – I just got the edge router lite and have been scouring the internet for examples. I also have CCA devices which connect to my Ubiquiti ACPRO.

    How have you separated your CCA devices from the rest of the network (or defined an area for them)? And what is this notation “eth3.30”?

  2. Cannyou please explain the steps needed after downloading the package? For instance where do I place the package in the edgerouter?

    Thanks for your help.

  3. I was able to get chromecast to work only doing the first part.
    Have only tried to cast the desktop from my desktop computer so far…

    [Edgerouter PoE]
    I have two Unify-AP-Lite connected to eth3 and eth4, that are switched in the router (switch0). The desktop cumputer is connected to eth1.

    set service mdns repeater interface eth1
    set service mdns repeater interface switch0

  4. Does this broadcast relay service also work on a Edgerouter X ?
    I want to use this service for my sonos. Does sonos also uses the port 1900 or do i have to use another port(s)

  5. You don’t need to install these 3rd party broadcast thing, just install the reflector and dig the hole into your firewall.

  6. I was looking for a way to access my Google home devices that were on my IoT WiFi from Home WiFi that my Tablets and Phones were on. I did the first two parts, setting up the repeater and putting a hole in my firewall and then did what Peter said turning on the reflector. It works like a charm.

  7. Thanks for this although I have a few questions that I’m not sure would be appropriate for you or Ubiquiti; I guess just answering what you can would be fine πŸ˜‰

    * Who made this software (ubnt-bcast-relay)? Ubiquiti?
    * If I have this installed, running, and configured on my EdgeRouter and I upgrade the firmware, will it blow the software away (as it is not part of the /config path)?
    * If the above is true and it *does* blow the software away, will the router config crash since it has commands relating to this software?

Leave a Reply

Your email address will not be published. Required fields are marked *