Monday, February 22, 2016

Setting up Mininet Network Emulator

Mininet VM with LXDE desktop
When learning computer networking related courses, it is necessary to get a hands on experience on the building networks based on the theories we learn. However, due to various limitations, it is not easy to use real hardware to build real networks. Simulating and emulating networks is the choice we have under such circumstances. Having said that, using network simulators/emulators is also not an easy job due to complexities in most of such software tools available out there. Therefore, it is important to find an easy to use and yet feature rich network simulator/emulator.

Mininet is a network emulator developed by some researchers in Stanford University and it is being used by different other universities in their networking courses. In this blog post, I'm writing down the initial steps of preparing the environment to use Mininet simulator on my computer. So, here we go.

(1) Download mininet vm image from here (I downloaded the 32-bit version).

(2) Extract the zipped file and inside it, we have .ovf file which can be imported
to a virtualization software. I used VMWare Workstation Player to import
this VM.

(3) Now, start the VM. It starts with text-only screen because there's no X11 sever. We can login to the VM using user name mininet and password again mininet.

(4) It is possible to use this tool without any GUI since we can login to the VM using ssh from our host OS and do all the network emulation stuff.

However, in case somebody want to directly perform network emulations on this VM using it's GUI interface, we should install a graphical desktop environment. Use the following commands for that.

sudo apt-get update
sudo apt-get install xinit lxde

(5) Now the vm is ready to be used. There are two ways to move forward from this point. We can either type startx on the prompt and goto the GUI to do our network emulation jobs or we can open a terminal from our guest OS and ssh to the VM as follows.

ssh -X mininet@

To find the IP address of the mininet VM, first of all we have to type 'ifconfig' on the command line of the Mininet VM. The above IP address is what I found out in that way.
Login to Mininet VM from host OS with SSH

I'm hoping to write few separate blog posts about using this Mininet emulator setup to implement and try different simple networks.




No comments:

Post a Comment