Part 2 – Install
In part 2 of this blog post, we cover off how to install the necessary components to build virtual SDN labs with Vagrant.
You need a good base machine (preferably 8GB or more RAM). We’ll assume that you’re running Windows, but it should be easy to adapt to other operating systems. Some spare disk space is needed for the software installs and for VM images.
Here are the steps to set things up (skip steps if not needed):
VirtualBox is used as the hypervisor (Provider in Vagrant-speak). It pretends to be a bare-metal chassis for guests that are spun up and manages resources such as CPU, memory and network.
Download and install VirtualBox from https://www.virtualbox.org/wiki/Downloads
Vagrant is the VM provisioning system. Download and install Vagrant from https://www.vagrantup.com/
Download a Box
Vagrant has the concept of boxes, which are pre-packaged VM images.
The labs in the repo use the bento box of Ubuntu 16.04. Download this box on your host machine with:
vagrant box add bento/ubuntu-16.04
Choose VirtualBox option from menu (2)
Install GitHub Desktop
This is a GUI client for git, skip if you prefer the command line git. See
I’ve created a GitHub repo of example SDN labs at https://github.com/mattjhayes/Vagrant. The repo includes a basic Mininet single-guest environment through to a multiple guest and switch environment.
Clone the Vagrant repo from https://github.com/mattjhayes/Vagrant.git into somewhere on your local file system that makes sense for you.
Run the Lab
To run a lab, navigate in a command prompt to the appropriate subdirectory off the git repo and type
Connect to the guest (assuming there’s only one) by using an SSH client to connect to localhost:2222
Username vagrant, password vagrant.
Connect to any further guests with SSH to localhost:2200 and increment port number for every subsequent guest.