forked from mirrors/nixpkgs
b3dbcbe249
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
10 lines
280 B
Nix
10 lines
280 B
Nix
# QEMU flags shared between various Nix expressions.
|
|
|
|
{
|
|
|
|
qemuNICFlags = nic: net: machine:
|
|
"-net nic,vlan=${toString nic},macaddr=52:54:00:12:${toString net}:${toString machine},model=virtio " +
|
|
"-net vde,vlan=${toString nic},sock=$QEMU_VDE_SOCKET_${toString net} ";
|
|
|
|
}
|