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
./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 ๐Ÿ™‚

5 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)

Leave a Reply

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