multicast "Network is unreachable" error

This is for discussing general topics about how to use VirtualBox.
Post Reply
peterc
Posts: 1
Joined: 2. Oct 2012, 23:23

multicast "Network is unreachable" error

Post by peterc »

Host system is 64 bit Ubuntu 12.04
Guests are 32 bit Centos 5.2
VirtualBox 4.1.22 r80657

Hello all,
I've set up 2 guest machines on an internal network (dc1) and can ssh between the 2. But when I try to run applications that use multicast I get some variation of ENETUNREACH error. I have a couple of simple test scripts that work on real hardware without any problems but don't work on my VMs, which makes me think that I need to do some VBox configuration.

Here is the ifconfig output from the guest:

Code: Select all

eth0    Link encap:Ethernet  HWaddr 08:00:27:2F:88:71  
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe2f:8871/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:43 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1770 (1.7 KiB)  TX bytes:9111 (8.8 KiB)
          Base address:0xd010 Memory:f0000000-f0020000 
And a sample perl script that hits the error

Code: Select all

 #!/usr/bin/perl
 # server
 use strict;
 use IO::Socket::Multicast;

 use constant DESTINATION => '226.1.1.2:2000';
 my $sock = IO::Socket::Multicast->new(Proto=>'udp',PeerAddr=>DESTINATION)
     or die "Could not create the socket: $!";
 $sock->mcast_if('eth0');

 while (1) {
   my $message = localtime;
   $message .= "\n" . `who`;
   $sock->send($message) || die "Couldn't send: $!";
 } continue {
   sleep 10;
 }
In setting up the internal network I used "VBoxManage dhcpserver" to get the IP addresses set up correctly, is there anything I need to do for multicast? Please let me know if there's more information I can provide.

Thanks!
Post Reply