mDNS On Mikrotik RB5009

Getting mDNS working cross-VLAN with a Mikrotik router requires running a container to do the handling. You’ll need a flash drive or some other kind of storage set up on the device to make it work.

Build the container

Clone the repo:

git clone https://github.com/mag1024/mikrotik-docker-mdns-repeater.git
cd mikrotik-docker-mdns-repeater

Build the container:

make container/arm64

SCP the container image to the router:

scp mdns-repeater-arm64.tar router:/usb2/mdns-repeater-arm64.tar

Interface config

Add virtual port for the container, the IP address doesn’t matter.

/interface add address=10.200.200.200/24 disabled=no gateway=10.200.200.1 gateway6="" name=mDNSveth

Setup the bridge-port VLAN tagging, and add it to the bridge

/interface bridge vlan
add bridge=bridge tagged=mDNSveth vlan-ids=10,20
/interface bridge port
add bridge=bridge interface=mDNSveth

Container Config

You need to enable containers with device mode on your router, which requires physical interaction.

Set up the environment variable to tell it what VLANs to link.

eg eth0.10 is VLAN 10 on the container interface - you need to specify all the matching VLAN IDs you want to bridge, space delimited.

/container envs
add key=REPEATER_INTERFACES name=mdns value="eth0.10 eth0.20"

Then start the container!

/container
add dns="" envlist=mdns interface=mDNSveth logging=yes mounts="" root-dir=usb2/ file="/usb2/mdns-repeater-arm64.tar"

This should be all you need to do :D



#mdns #mikrotik #howto