问题描述
我正在测试使用多播进行发现的应用程序。我创建了一个Swarm集群,并创建了 network创建-d overlay swarm-net
,以便容器在多个Swarm代理主机之间共享相同的LAN。
I am testing an application using multicast for the discovery. I created a Swarm cluster and a network create -d overlay swarm-net
so the containers share the same LAN across the several Swarm agents hosts.
发现似乎无法正常工作,因此我安装了 tshark
。 tshark
显示运行 tshark
的IP地址节点,并发送包的多播地址尽管 tshark
不显示任何传入的多播数据包。
The discovery seemed to not be working, so I installed tshark
. tshark
shows the IP address node within which tshark
is running and the multicast address for the packet being sent though tshark
does not show any incoming multicast packet.
,因为我不知道有什么更好的方法,所以容器使用-特权
运行,以启用 tshark
。
还请注意容器之间可以相互通信。
Note that, as I don't know a better way to do so, the container is run with --privileged
to enable tshark
.Note also that containers can communicate with each other.
是否由于Docker iptable而阻止了多播?
如何在覆盖网络中启用多播?
Is the multicast blocked because of Docker iptable?How to enable multicast in an overlay network?
推荐答案
覆盖驱动程序网络不支持多播,因为它使用vxlan单播,根据(和我的
Overlay-driver network does not support multicast as it uses vxlan unicast, according to chanwit (and my experience so far).
请注意,插件(覆盖网络驱动程序)支持!
Note that the plugin weave net (an overlay network driver) does support multicast!
这篇关于使用Docker Swarm和覆盖网络进行组播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!