0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 05:38:57 +03:00

* Use vde_switch instead of QEMU's multicast feature to tie QEMU VMs

together into virtual networks.  This has several advantages:

  - It's more secure because the QEMU instances use Unix domain
    sockets to talk to the switch.

  - It doesn't depend on the host's network interfaces.  (Local
    multicast fails if there is no default gateway, so for instance it
    fails if a laptop is not connected to any network.)

  - VDE devices can be connected together to form arbitrary network
    topologies.

  - VDE has a "wirefilter" tool to emulate delays and packet loss,
    which are useful for network testing.

svn path=/nixos/trunk/; revision=25526
This commit is contained in:
Eelco Dolstra 2011-01-12 18:47:23 +00:00
parent fd48855284
commit b3dbcbe249
4 changed files with 51 additions and 51 deletions

View file

@ -10,16 +10,6 @@ use Cwd;
use File::Basename;
# Stuff our PID in the multicast address/port to prevent collissions
# with other NixOS VM networks. See
# http://www.iana.org/assignments/multicast-addresses/.
my $mcastPrefix = "232.18";
my $mcastSuffix = ($$ >> 8) . ":" . (64000 + ($$ & 0xff));
print STDERR "using multicast addresses $mcastPrefix.<vlan>.$mcastSuffix\n";
for (my $n = 0; $n < 256; $n++) {
$ENV{"QEMU_MCAST_ADDR_$n"} = "$mcastPrefix.$n.$mcastSuffix";
}
my $showGraphics = defined $ENV{'DISPLAY'};