Set up Your Own Virtual Network: A Virtual Box/Mininet Environment for SDN
Mininet is a simulation environment that creates a realistic virtual network, running real kernel, switch and application code, on a single machine (VM, cloud or native), in seconds, with a single command:
Figure 1: Mininet Virtual Environment
Throughout this course, you will use Mininet to set up and test network topologies. The information below will help you set up your environment.
Setup VM
Follow the instructions here to install your VM. You will:
- Install Vagrant, a wrapper for virtualization software like VirtualBox and VMWare
- Install VirtualBox, your VM provider
- Use Git to download course resources
Download X Server and SSH capable terminal
- For Windows install Xming and Putty.
- For Mac install XQuartz and use the Terminal.app (builtin)
- Linux comes pre-installed with X server and Gnome terminal + SSH (buitlin)
Test Mininet Installation
Final step is to test the Mininet installation.
Login to your VM and type:
$ sudo mn
This will start a basic mininet virtual environment with one switch (s1) and two hosts (h1 & h2). You will now see a Mininet CLI. In this CLI, type:
$ xterm h1
$ xterm h2
You will see two new white terminal windows popping out.
If all this works out without any error, then we have successfully completed the Mininet Setup.
Important Notes on Setup
Follow the instructions closely
If you are running a 64bit OS, run a 64 bit VM
If you are running a 32bit OS, run a 32 bit VM
Disable Hyper-V on Windows
Enable Virtualization support on the host (BIOS setup)
The VM runs 192.168.0.0/24 as default network, so if you use that network locally you need to change it
(edit Vagrantfile: config.vm.network :private_network, ip: "192.168.0.100”)
The host machine needs to run an X server (it’s native on Linux; OS X and Win require the installation of an X Server)
Basic Terminology
VirtualBox console terminal: connects to Mininet VM. This is the one created when you started up the VM. You can't copy and paste from this page to the console terminal, so it's a bit of a pain. Minimize this NOW, if you haven't already done so. Once you've used it to set up networking, it won't be needed.
SSH terminal: connects to Mininet VM. Created by using putty on Windows or SSH on OS X / Linux, as described in the previous section. Copy and paste should work on this terminal.
xterm terminal: connects to a host in the virtual network. Will be labeled at the top with the name of the host.