Mininet Installation

In this tutorial, We are going to cover step by step installation of Mininet Software. Mininet is an emulator used for OpenFlow & Software Defined Networking experiments. First of all install any version of ubuntu linux. In our case, we are using Ubuntu 14.04 server edition for installing Mininet.

Step 1: First of all we have to download mininet software from github.com by using “git” utility. When we run the “git” command, it gives the error that “command not found”. So we need to install “git”. Use “sudo apt-get install git” to install git.

79-vmplayer-create-ubuntu-vm-poweroff

Step 2: Screenshot of git installation.

1a-mininet-install-git

2-mininet-install-git

Step 3: Now run the command “git clone” to download the mininet source code from “github.com” site.

3a-mininet-install-git

Step 4: We have successfully downloaded the source code. Move to mininet directory. Check the different branches of mininet available by running “git tag” command.

4-mininet-install-mininet

Step 5: Since we want to use the latest branch which is “2.2.1” at the time of writing this tutorial.  Use the “git checkout -b” to move to “2.2.1” branch. Do not forget to use “sudo” otherwise you will get permission denied errors. We also need other software like Pox Controller, OpenVswitch, Wireshark for setting up proper SDN labs. So use the script “install.sh” with “-a” option to install everything required. Run the script as shown in screenshot.

5-mininet-install-mininet

Step 6: Screetshot of installation process. Installation will take 5-20 minutes depending upon internet speed.

6-mininet-install-mininet

Step 7:  In some cases, It might gives errors. In that case try to use “–force-yes” switch. If still you are not successful in installation, then use “-y” & “–force-yes” as shown in screenshots. In the end, it will show install successful message.

7-mininet-install-mininet

8-mininet-install-mininet

Step 8: To verify the installation, just run “mn” command. It will set up a lab of minimal topology having 2 hosts “h1”, “h2”, one switch “s1” & will start the reference controller. Check the connectivity between hosts “h1” & “h2” by using “pingall” command. As can be seen, we are successful in running mininet.

9-mininet-install-mininet

Step 9: Also check whether Pox is running properly or not by using the command as shown in screenshot. You have to run this command from “pox” directory inside your home directory.  In our case, Pox is working properly.

10-mininet-install-mininet

Creating Keypairs for Amazon EC2

Amazon EC2 (Elastic Cloud Computing) is used for IAAS (Infrastructure As A Service) Cloud. It is used using creating Linux & Windows instances in the cloud. After creating instances, we need to access them remotely. During creation of instances, we need to specify the keypair that we are going to use for accessing instances. Step by step procedure for creating keypair in Amazon AWS Cloud.

Step 1:  login at “aws.amazon.com” using your account

1-aws-login-modified

Step 2: Choose “EC2” from compute services

2-aws-mgt-console

Step 3: All the resources which has been created or deployed will be shown. As can be seen, no keypair has been created. Click on “Key Pairs” for creating new keypair.

3-aws-ec2-dashboard

Step 4: Press “Create Key Pair” button.

4-aws-ec2-key-create

Step 5: Give some name to keypair. In our case, we have given the name “vipin”.

5-aws-ec2-key-create

Step 6: It will ask to save your key. It is saving the key as “vipin.pem”. We saved the key on the desktop.

6-aws-ec2-key-create

Step 7: This dashboard screenshot shows the key and its fingerprint.

7-aws-ec2-key-create

Step 8: We also created 1 folder “keys” in our “F:” drive and also download 2 utilities called “putty” and “puttygen”. “putty” is used for remotely accessing linux instance. But the problem with this utility is that it can not use the key in “pem” format. We need to convert the key from “pem” format to “ppk” format using “puttygen”.

8-aws-ec2-key-create

Step 9: Open “puttygen” utility. It will show some warning message. Just click on “Run“.

9-puttygen

Step 10: It has started the Putty Key generator utility.

10-puttygen

Step 11: Click on “File” menu & choose “Load private key”.

11-puttygen

Step 12: Select “vipin.pem” & click on “Open” for loading the key.

12-puttygen

Step 13: It will show the message that key has been imported successfully.

13-puttygen

Step 14: Click on “Save private key” option to save the private key in “ppk” format.

14-puttygen

Step 15: Before saving the key in new format, it will ask whether we want to protect the key with passphrase or not. In our case, we want to save the key without protecting it with the passphrase.

15-puttygen

Step 16: Save the key with name as “vipin.ppk”.

16-puttygen

Step 17: As can be seen, it has converted the key into “ppk” format

17-puttygen

Step 18: Open the “putty” utility. It will give some warning. Ignore the warning.

18-putty

Step 19: It has opened the “putty” utility. We will be using this utility when accessing linux instance.

19-putty