virtnet on Windows


I created virtnet to make it easy to automatically created Linux nodes in VirtualBox, configured into various common network topologies. The main intention was to support teaching: it allows students to quickly create a network topology without knowing too much about VirtualBox or wasting time with repetitve tasks. I created virtnet as a set of Bash shell scripts. In that way running on Linux and OSX hosts was easy, but running on Windows hosts required installation of cygwin. I have had a 100+ students use virtnet in classes successfully on Linux, Windows and OSX hosts.

Moving to CQUniveristy, the lab setup and teaching arrangements is different such that it is difficult to require students to install and configure software on lab computers. Therefore I have created some Windows command scripts, to be used instead of the Bash shell scripts, that can easily be used in Windows only labs. That is, a quick/easy way to run virtnet on Windows hosts. However there are two limitations:

  1. The Windows command scripts I have created so far only cover 4 topologies. For teaching and demos these topoogies are sufficient. If anyone wants a different topology let me know.
  2. Once nodes are created by the Windows command script, you have to manually login and run another script in each node to finish the configuration. (This is because Windows doesn't have a builtin SSH client).

Despite the limitations, I think it can be easier to use virtnet on Windows hosts. The following is instructions for getting setup.

Setting Up virtnet on Windows

  1. Download the base virtual machine (450MB), and extract/unzip it. Also download the Windows command scripts: vn-topology01.cmd | vn-topology03.cmd | vn-topology05.cmd | vn-topology07.cmd
  2. Open VirtualBox, and from the "Machine" menu select "Add...". Then browse to the folder of the extracted ZIP and select base.vbox. This should create a virtual machine in VirtualBox called base. Do NOT start the base VM.
    Add base machine to VirtualBox
  3. Double-click on a topology file (e.g. vn-topology05.cmd) and follow the instructions to setup the topology. In short for each node you need to:
    1. Start the node in VirtualBox
    2. Login to the node using username network and password network
    3. Type and run the command:
      sudo bash virtnet/bin/vn-deploynode x y
      where x is the topology number (1, 3, 5 or 7) and y is the node number (1, 2, 3, ...).
    4. Reboot the node with the command:
      sudo reboot

    The screenshot below is an example for topology 5, which has 3 nodes:
    Configure topology 5

Once all of the nodes have been started, deployed and rebooted, you can start using them.

If you have problems or do not understand the steps, see the 17 minute screencast:


Currently four different topologies are provided:

You only create one topology at a time. If you want to change topologies, make sure you delete the nodes from VirtualBox before creating the new topology.