A control network is a network dedicated to the control of the VMs that belong to a Virtualbricks testbed. Having a control network separated by the network used for network experiments allows the user to isolate the link used for the experiments. This brings two advantages. First, control traffic, i.e. data sent to VMs to manage an experiment, does not interfere with data traffic exchanged between VMs during the experiment, which is essential; second, scenario impairments, such as long delays, high loss rate, etc.disruption, do not affect control traffic, making slow or impossible (e.g. in DTN partitioned networks) the actual control of VMs. By default, we use the network 10.0.0.0/24 as control network, and all VMs of our testbeds are connected to the host (10.0.0.1) by means of their first NIC, dedicated to this service.
To set up a control network we need to install and enable a vde_switch on the host. Optionally, the user may also want to install a DHCP, but this second step should be skipped by the users of our testbeds or our images, where an alternative method is preferred. Last, the testbed and its VMs must be configured to use the vde_switch on the host. Also this third step must be skipped by our testbed users, which come preconfigured (they only require the installaton of the vde_switch to be succesfully switched on).
The vde_switch is just a virtual switch. It is one of the tools provided in the VDE package. In Debian and Ubuntu the packet vde2, is already installed, or it can be easily installed from official repositories. As a last resort, if in your ditribution the packet is not included, it can be installed form the source code, by following the guide provided here.
A vde_switch must be configured to start at boot and then remain active. It will have a TAP interface that will be used as connection point between the VMs and the host.
Instructions: (you may find convenient to cut and paste most commands on your terminal):
tar jxvf vde_switch-init.tar.bz2
sudo cp vde_switch /etc/init.d/
sudo chmod +x /etc/init.d/vde_switch
sudo update-rc.d vde_switch defaults
sudo adduser USERNAME kvm
sudo reboot
sudo ifconfig
you should find a new network interface tap0 address 10.0.0.1. This is the address of the host on the control network (10.0.0.0/24). VMs will have to use it to address the host.
To address the VMs from the host (e.g. to log in via ssh), you need to know their IP adresses on the control network. All our testbed VMs have this address preset (e.g. in DTN2hops 10.0.0.11, 10.0.0.12 etc.). The same holds true for our base images (10.0.0.10).
Advanced users only: read the following if you want to build a new testbed from scratch advanced instructions