Is there any way to achieve this? I can't use "--net host" since i need more containers to run in the same host and map ports with the host.
-
1Possible duplicate of [How do I publish a UDP Port on Docker?](https://stackoverflow.com/questions/27596409/how-do-i-publish-a-udp-port-on-docker) – David Maze Jun 23 '19 at 11:58
-
That solution doesn't work for multicast udp traffic, so far I only made it work with --net host which is what I want to avoid – druanoor Jun 23 '19 at 20:26
1 Answers
This is followed by your own moby/libnetwork
issue 2397, which just received (oct. 2021) the update:
Multicast to/from a docker bridge network is currently not possible.
This is due to limitations with how linux kernels provide support for multicast routing.
Packets are forwarded to the docker bridge using iptables and the unicast routing table, but multicast packets are handled differently in linux kernels.A workaround is to run a tool like smcrouted on the host (or in a container with access to the host network).
This process does the work of managing the linux multicast forwarding cache.Side note: If running
docker swarm
, and all your multicast communication is happening between nodes you can control, you could use weave net, which apparently has support for multicast.It would be nice if we could see some multicast support added here... but ultimately it feels like more of a kernel issue.
This suggested a macvlan bridge, a way to bridge the container into a physical network.
There is also IPVlan driver, still experimental 4 years later, and the feedbacks are still ongoing.

- 1,262,500
- 529
- 4,410
- 5,250