Multicast pitfalls

Multicast might seem like a great idea for 2 problems: iptv and discovery. In my case it seemed like a very good idea for cluster node auto-discovery: no need to configure each node with all the other nodes, no need to know the number of nodes beforehand, use a single node configuration. However it seems that more and more nodes are discovered you can fall into some very dark pitfalls which could eat days and nights of your time until either you find a solution, either you revert to tcp or udp unicast. And the conclusion is that multicast at network level is not something you can assume working as is the case for tcp or udp unicast. Here are some pitfalls I found in various deployments and the solution or lack of, I could or could not find.

KVM host/linux guests

The setup: linux guests on kvm hosts with virtio or e1000 emulated nic’s.

The problem: multicast stops working after some time.

The solution, as described here:

echo 1 > /sys/class/net/virbr0/bridge/multicast_querier

KVM host/win guests

The problem above also applies to windows guests but for windows guests there is also a problem when using e1000 emulated nic’s. The solution is to use rtl emulated nic’s combined with the fix above.

Virtual box host

This seems to have multicast support in both bridged and host-only network mode, worked perfectly.

Vmware ESX host/win guests

Multicast does not seem to work by default and there is also the problem of the nic’s, however vmware only emulates intel cards, I did not spent a lot of time with this but reverted to tcp instead.

Real servers with cheap infrastructure

Multicast is not supported unless an igmp router is present in the network. Most cheap routers convert all multicast to broadcast. In case the router also provides wifi it’s very likely to send 1 packet and to receive n packets where n varies with the number of wifi clients and the number of interfaces you have on your server. It’s not reliable, a router supporting multicast is needed. For home routers DD-WRT seems to support igmprt (igmproxy) but I did not try to configure it.


Leave a Reply