VirtualBox multicast on a bridged network
I can confirm that multicast does work between two VirtualBox (v4.3.20) VMs using bridged networking. I used the open-mtools package to test the traffic, along with Wireshark on the host. Here is a sample test:
From VM1 (Receiver):
mdump -omdump1.log 224.9.10.11 12965
From VM2 (Sender):
msend -1 224.9.10.11 12965 15
Related videos on Youtube
Francesco
Updated on September 18, 2022Comments
-
Francesco over 1 year
using VirtualBox, I got two guests (DEBIAN7.7) on my host (WINDOWS7). Each of the two guests has a bridge network interface,
eth1
and can ping the other one, I can see eacheth1
has multicast enabled. Everything looks fine but, multicast itself seems not working. How can I check if the bridge obtained network support multicast? How to set VirtualBox guests network supporting multicast?UPDATE: given guests's ip address as 192.168.0.9 and 192.168.0.10,
tcpdump -i eth1 -n src host 192.168.0.10
shows that very packets were sent from guest. I got a Wildfly on each guest which is supposed to go in cluster.UPDATE: digging deeper into issue, I can see Wildfly istances go cluster (
... Received new cluster view: [srv2/web|3] (2) [srv2/web, srv1/web]
) but they don't share http session. Weird.-
heavyd over 9 yearsHow are you testing your multicast packets? In order to receive multicast traffic the client must join the multicast group that the multicast traffic is sent to, otherwise it will never receive the traffic.
-
Francesco over 9 years@heavyd I'm a newbie at Linux. I can see both Wildfly instances connect to the same multicast address but they don't go cluster. Any tip to check if multicast is supported are welcome.
-
-
Francesco over 9 yearshello, I tried with netcat:
netcat -l 230.0.0.4
on a node andecho "hi" | netcat 230.0.0.4 45688
on the other node of the cluster. 230.0.0.4:45688 is the JGroups udp multicast address used by Wildfly nodes. I get back aNetwork is unreachable
. What am I missing? TIA. -
heavyd over 9 yearsFirst off, I'm pretty sure
netcat
uses TCP by default, you'll need the-u
option to make it use UDP, as multicast doesn't work over TCP. Also, I don't thinknetcat
will join the multicast group when listening with the command line you gave. -
Francesco over 9 yearshaving some problem making open-mtools work. Can you point me to some documentations about it?
-
Francesco over 9 yearsI made some tests using jgroups. On a guest I execute
java -classpath org.jgroups.tests.McastReceiverTest -mcast_addr ... -port ...
and on the other guest I executejava -classpath org.jgroups.tests.McastSenderTest -mcast_addr ... -port ...
. I can send some data and receive correctly on this addresses230.0.0.4:45688
,230.0.0.4:45700
and224.0.1.105:23364
. It looks multicast is working. Problem persists but you point me to the right direction.