Kinda depends on how the LANs (or VLANs…) your trying do mDNS reflection on ingress the router/switch. The simplest case would be using two bridges (bridgeA and bridgeB) and two virtual ethernets, vethA and vethB, for Avanti container. Assuming your “LAN A” (e.g. “computers/WiFi”) is using ether1 and “LAN B” (e.g. “printers”) is using ether2. You’d then add ether1 & vethA as bridge ports on bridgeA, same for ether2+vethB going as ports on bridgeB (on /interface/bridge/ports).
VLAN Filtering likely be better long term, be one bridge, but that adds complexity here. You’d add both vethA and vethB as interface to the /container. Like more, basically one bridge/veth per [V]LAN you want Avanti to use.
Where I think the trouble lies isn’t bridging the L2 traffic – lots of way to do that in ROS. But finding a pre-compiled Dockerfile that exposes some UI to manage Avanti or has SSH enabled out-of-the box, AND is pre-compiled for the Mikrotik CPU your want to use, which need some “real” disk (USB, SSD, etc). Lots of Docker images for X86/AMD64, but only some number for ARM32 etc… You got a TILE, well, good luck but be interesting.
The current implementation doesn’t allow “console access” so once you get the image running on the Mikrotik, you have to essentially start/stop the container and use /container/set 0 cmd=“…” each time to modify the image. Normally you can just “compile” a Dockerfile, but unless you’re on the same CPU arch, that get tricky – most people don’t use an ARM32 as there desktop computer – docker supports “buildx” and scheme to deal with this BUT way more complex than L2 bridging on a Mikrotik part.
But, a poor-man function to proxy for a shell to the container looks like this, assuming you a container, it’s working, and logging=yes. Add something like this (as example of concept):
:global DockerDo do={/container/stop $1; :delay 10s; /container/set $1 cmd="$2"; /container/start $1; /log/print follow where topics~"container" and time>([/system/clock/get time]-10s)}
To use this, you can issue a ONE command $DockerDo [container number, “0”] [cmd to run in container] against the docker image, which will start/stop in-between your commands. Since the output it shown via /log/print follow, you’ll need to use Ctrl-C to then issue another command:
> $DockerDo 0 "uname -a"
12:55:51 container,info,debug Linux julia162 5.6.3 #15 SMP Mon Sep 20 07:31:39 UTC 2021 armv7l GNU/Linux
> $DockerDo 0 "uname -a"
12:57:58 container,info,debug Linux julia162 5.6.3 #15 SMP Mon Sep 20 07:31:39 UTC 2021 armv7l GNU/Linux
-- Ctrl-C to quit. Space prints separator. New entries will appear at bottom.
Although I’ve never been sold on the need for “reflecting” mDNS – kinda the point of subnetting is to limit broadcasting. If you just have some “well known printers” you want showing up on iPhone, using domain name in DHCP and some specfic DNS PTR/SRV records will do the same as mDNS broadcasts if that’s what your after, see RFC6763 - https://www.ietf.org/rfc/rfc6763.txt\
Now why Mikrotik has not added mDNS/avanti, just to stop the requests, is a different question. Guessing they are betting Docker is simpler answer, well see.