Day 10: Mininet Simulation of a basic distributed SDN controller architeture

Hi and welcome back!
We have not been able to update the blog since we were busy debugging and figuring out!!!

We are back to give you an in-detail explanation of how we have simulated a basic distributed SDN controller architecture.

Requirement:

  • 2 Hosts
  • Mininet up and running
  • Ryu controller up and running on each
  • 1 D-link switch
We have used two linux machines with Ubuntu 16.04 OS running on them. 

How to install Mininet?

Run the following command on a terminal to install mininet:
> sudo apt-get install mininet

How to install Ryu Controller?

Make sure to install Ryu controller on each of the Linux machines so that they can act as a controller. Run the following commands for a successful installation of Ryu controller:

> git clone git://github.com/osrg/ryu.git
> cd ryu
> sudo apt-get install python-dev python-pip python-setuptools  

> sudo pip install .
> sudo pip install webob eventlet paramiko routes

Set Up the network

Connect the two hosts through a D-link switch and set their IP addresses. We have configured it as follows:
Controller 1-
> sudo ip addr add 10.0.0.1/24 dev interface-name

Controller 2-
> sudo ip addr add 10.0.0.2/24 dev interface-name

Use this code to create a custom topology on Mininet with 4 hosts, 2 switches and 2 controllers.
H1 - S1 - S2 - H3
         |       |
       H2   H4
Both S1 and S2 can be controlled by C1 and C2 controllers.

Run the above code using the following command:
> sudo -E python filename.py

Open another terminal to run the controller. Run the following command:
> ryu-manager ryu/app/simple_switch_13.py

To test the accessibility of hosts, try to run the following:
> pingall

You can run the controller on C1 or C2 to be able to check the accessibility of all hosts from one of the host.

Comments

Popular posts from this blog

Day 12: Master Slave SDN Controller Architecture

Day 50: Tcpreplay and tcpliveplay approach