Get Google Speaker Groups and Sonos to work on separate VLANs

Networking Oct 29, 2020

If you have made the smart decision of placing IoT devices on a separate VLAN you may notice that Google Speaker Groups, Sonos and many other systems do not work. This is due to the fact the UDP Broadcast is not reaching the other VLAN’s.

What we'll achive:

  • Setup UDP Broadcast Relay

What you need:

  • pfSense terminal or a Linux Box/VM which is on both VLAN's

The following instuctions will be aimed at a Ubuntu System.

Install

  1. Update Linux
    sudo apt update && sudo apt upgrade
  1. Make sure Git is installed
    sudo apt install git
  1. Download the GitHub Repo
    git clone https://github.com/udp-redux/udp-broadcast-relay-redux
  1. Enter the Directory
    cd udp-broadcast-relay-redux
  1. Install make
    sudo apt install make && sudo apt install gcc
  1. Make the executable
    make
  1. Run the executable
    sudo ./udp-broadcast-relay-redux --id 1 --port 5353 --dev <NIC1> --dev <NIC2> --multicast 224.0.0.251 -s 1.1.1.1 -f

Create service to start on boot (Optional)

  1. Create systemd service
    sudo nano /etc/systemd/system/udp-broadcast-relay.service

Use this as a template:

[Unit]
Description=UDP Broadcast Relay

[Service]
ExecStart=<PATH> --id 1 --port 5353 --dev <NIC1> --dev <NIC2> --multicast 224.0.0.251 -s 1.1.1.1 -f
Type=oneshot
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

PATH = Path to the executable e.g. /home/USER/udp-broadcast-relay-redux/udp-broadcast-relay-redux

NIC1 = Network Adapter name e.g. eth0
NIC2 = Network Adapter name e.g. eth1

Tip: Show all NIC's on Linux with ip addr show

  1. Start Service
    sudo systemctl start udp-broadcast-relay.service
  1. Enable at boot
    sudo systemctl enable udp-broadcast-relay.service

Sources:
https://github.com/udp-redux/udp-broadcast-relay-redux

https://medium.com/@benmorel/creating-a-linux-service-with-systemd-611b5c8b91d6

Cover Image Credit: https://unsplash.com/@galex

Tags