OpenDaylight with Mininet

OpenDaylight(ODL) is an open source Software Defined Networking (SDN) controller platform which provides a number of ready-to-install features for networking solutions. It also provides a platform to develop our own features. Mininet is an open source network emulator which runs a collection of end hosts and network devices which are created using software to make a single system look like a real network.  This blog post describes step by step instructions to use ODL controller with mininet.


As ODL is a java based controller, first install java run-time environment on your machine using below commands:

sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install oracle-java8-set-default

Next, install mininet on your machine using below commands:

git clone git://github.com/mininet/mininet
cdmininet
~/mininet/util/install.sh -a

Test your mininet installation through a ping test:

sudomn --testpingall

This command creates a network with two hosts connected with a single switch, starts a default controller and tests ping reachability from one host to other. Both the hosts should be able to ping each other.
Next, download ODL(beryllium version) using below command:

 

wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.4.0-Beryllium/distribution-karaf-0.4.0-Beryllium.tar.gz

Next, extract the downloaded file and install the controller using below commands:

sudo tar -xvzf distribution-karaf-0.4.0-Beryllium.tar.gz
cd distribution-karaf-0.4.0-Beryllium
./bin/karaf

As mentioned earlier, ODL provides a number of ready-to-install features. Install few basic required features using below command on karaf console:

opendaylight-user@root> feature:install odl-restconf odl-mdsal-clustering odl-dlux-core odl-dlux-node odl-dlux-yangui odl-dlux-yangvisualizer odl-l2switch-all

Now on your machine, mininet environment is set and ODL controller is installed and running. Create a simple single switch, 2 hosts topology in mininet using ODL as remote controller:

sudo mn --topo single,2 --controller=remote,ip=127.0.0.1

Test the setup through a ping test:

mininet> pingall

Hit below mentioned URL to view topology and YangUI on your favorite browser. Use username/password: admin/admin to login.

http://<Controller IP>:8181/index.html

We will explain how to implement Quality of service by limiting bandwidth using ODL controller in our next blog posts.


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s