Installing Mininet, OpenDaylight and Open vSwitch
The easiest way to get started with a quick SDN lab image is using the Mininet image that is now managed by the ONLAB which is part of the ONRC. They do a nice job keeping the images maintained. Ideally the will incorporate ODL into the image soon since the ODL GUI is great for folks to get started with SDN.
Download and Bring up Mininet
You can use your prefered hypervisor of choice to run the image. The Mininet guide has instructions for each. Download Mininet and get the image up and running with the following guide:
Download and Get Started With Mininet
Open vSwitch should already be running when you boot mininet. You can stop and start the process with:
1 2 3 4 |
/etc/init.d/openvswitch-switch [start | stop | restart] /etc/init.d/openvswitch-controller [start | stop | restart] |
Stop the controller if you are using ODL for control.
1 2 3 |
/etc/init.d/openvswitch-controller stop |
Download and Start OpenDaylight
Performing the following will get OpenDaylight up and running on your mininet instance or you can run it on the host OS (or any other with IP connectivity). It is a simple two node network. If you run into issues head to the #opendaylight irc channel on irc.freenode.net.
From Mininet run the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
apt-get update apt-get install maven git openjdk-7-jre openjdk-7-jdk unzip wget https://jenkins.opendaylight.org/controller/job/controller-merge/lastSuccessfulBuild/artifact/opendaylight/distribution/opendaylight/target/distribution.opendaylight-osgipackage.zip unzip distribution.opendaylight-osgipackage.zip cd opendaylight ##Add to ~/.bashrc for persistence through a reboot## export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64 ./run.sh ### Then go to http://:8080 ### ### On Mininet ### mn --controller=remote,ip= --topo=linear,2 --listenport=6633 ### Example ### mn --controller=remote,ip=192.168.254.128 --topo=linear,2 --listenport=6633 |
Upgrade Open vSwitch to v2.0
If you want to upgrade the Mininet OVS instance to the latest v2.0 you can pull from the following repo.
1 2 3 4 5 6 7 8 9 |
sudo apt-get install python-software-properties software-properties-common sudo add-apt-repository ppa:mighost/ppa sudo apt-get update /etc/init.d/openvswitch-switch stop /etc/init.d/openvswitch-controller stop sudo apt-get install openvswitch-common openvswitch-datapath-dkms openvswitch-switch /etc/init.d/openvswitch-switch start |
For a more advanced tutorial and topologies see the following link:
OpenDaylight Controller with Mininet →
A nice video by James Ahn is at the following:
Youtube Installation Instructions →
If you want to ssh to the host and run Wireshark you need to have X enabled in the SSH session. On a MAC until Wireshark fully evacuates QT use XQuartz.
1 2 3 4 |
ssh -XY sudo wireshark |
Install a Linux GUI
Install LightDM or Gnomae Desktop if you want a GUI
If you want a GUI either of the following will install a stripped down build (no office etc).
1 2 3 4 5 |
apt-get no-install-recommends install ubuntu-desktop ### Or Gnome ### sudo apt-get install gnome-core |
A simple remote remote desktop application is XRDP. For installation instructions see this post here.
ONLab Chat with ODL
The ONLAB recently presented their work to the Technical Work Stream OpenDaylight call that is open to anyone along with the TSC weekly call. Take a look at the recording if interested. They are doing some interesting stuff with network topologies and also expanding Mininet to a multi-node distribution.
OpenDaylight Tech Work Stream (See the September 30, 2013 meeting Recording at the Bottom)
Update: I ran into a nice, relatively new blog that had a nice post with a clear custom topology explanation and other good hands on posts:
Tools used with Opendaylight – Sreenivas Makam’s Blog
Thanks and happy hacking!
nice, keep up the datalove
Hi Brent,
Thank you for your all wonderful posts in this blog
I started studying SDN a few months ago, and honestly this website is the best.
Thanks to your website I got into pox controller fast, and now also studying opendaylight.(though it looks more difficult). Good work Brent!
Keep up the ace work!
Thanks guys, that is very kind of you all. If you are on irc.freenode.net say hi to me and lets do some cool stuff!
Respect,
-Brent
Just a note about Mininet. If you want to whip up a custom network topology really quick, try MiniEdit. It came as an example script in Mininet, but I have taken and evolved it quite a bit.
http://gregorygee.wordpress.com/category/miniedit/
Great posts by the way. Your blog is a subscription in my RSS reader.
Great tutorial here.
I am new to the SDN stuff and am a research student working with the ODL controller.
I have a couple of questions. Can I run the daylight controller on a remote node connected to one of the pronto (p 3290) switches which are OF 1.3 capable. Is it possible to remotely deploy the controller or do I have to use, say my p.c as the controller?
Thanks!
Srikanth
Hi Srikanth, so sorry for the delay and Im sure you already found the answer but in case anyone had the same question you can certainly run the controller anywhere. As long as there is TCP connectivity to 6633 (or whatever the OF port is) you are in great shape.
Cheers,
-Brent
A question on the upgrade of Openvswitch to 2.0: The repository you point to doesn’t seem to have a 2.0 package for the controller (or at least my system is not able to find a candidate package). After upgrading the switch, I am getting an error from mininet showing that it can’t find a controller, did you run into this situation?
Thanks
Fernando
Let me reply to my own question: mininet requires the openvswitch-controller binary to be in the system, but it actually asks you to shut it down before starting.
Even if you upgrade the rest of the system to 2.0, you can keep the controller in an older version. I am running Ubuntu 13.10 in my test system which comes with openvswitch controller version 1.10-2. After upgrading the rest of the Openvswitch packages to 2.0 with the repository mentioned in this article, I was able to manually reinstall the controller downloading the .deb package from here (https://launchpad.net/ubuntu/saucy/+package/openvswitch-controller) and installing it with “dpkg -i –force-all openvswitch-controller_1.10.2-0ubuntu2_amd64.deb).
This is probably not the most orthodox way of running this thing but it seems to work fine… I hope the repository above will soon provide a proper controller package, but in the meantime…
Hope this helps!!
Fernando
Hi Brent!
I’ve a question about the ovs-switch. I’ve been looking(and thinking) for some nice solutions to use the controller with a set of clusters and found out that Opendaylight Controller proposes to use High Avalability Model in this case(in general distributed set of multiple controllers act as one). Looks very attractive, plus current OF specification gives some definitions on multi-homed switches(exactly the switches which may connect to multiple controllers) but the sad thing that(as I understood) support of multi-connections is left to vendors of the switches. I just wonder, does ovs support multiple connections? Maybe there are some other switches that can do that?
Hi Brent, love what you’re doing with SDN. Huge Fan. Any chance you know when the first download for opendaylight will come out? I’ve not received any updates on the newsletter and this URL (http://www.opendaylight.org/downloads) is still stating the download will be available Q4 ’13 … Figure you may know the inside scoop..details.
Omer
Hi Omer, kind to say. Hydrogen slipped from December because the OF v1.3 plugin took longer to implement then the guys working on it thought. That said we are using v1.3 now and coding in what we needed from the plugin into the oVSDB project. The ODL summit is the beginning of next month so we wont miss that. We are expecting a code freeze in the next week or two for final QA.
Here are some notes on v1.3 I just sent over to someone when they were asking about the NB API for v1.3 in case they help.
/*
Hi Vivek, I have just started coding with the OFv1.3 interface. There are still tweaking needed but they did a really nice job with it. I haven’t done anything w/ the northbound interface yet but only accessing the MD-Sal “org.opendaylight.controller.sal” to get flows for OVSDB and Net-Virt nailed down. I will have a post on it as soon as we get it commited in the next week or so. In the meantime here is a screencap of the OF Library to MD Sal conversion. https://www.dropbox.com/s/tuqj1bit6zhr3i6/MD-Sal-UML.png.pdf
Also Here is a Test Unit that Ive been using to get started.
https://git.opendaylight.org/gerrit/gitweb?p=openflowplugin.git;a=blob;f=test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java;h=0a1301da4ca96ed643cd45d56f2e18b8e288c8f4;hb=b3dd6aac41b5c8e074c325e5bde7318022917e39
*/
Cheers!
-Brent
Thanks a lot for a detailed explanation
I have actually installed OpendayLight components on direct physical machine
How do I uninstall completely all the components of ODL
Thanks,
-Ram
OK I figured it myself
Following command removes the opendaylight project:
mvn build-helper:remove-project-artifact
[INFO] — build-helper-maven-plugin:1.8:remove-project-artifact (default-cli) @ distribution.opendaylight —
[INFO] /root/.m2/repository/org/opendaylight/controller/distribution.opendaylight removed.
Howdy Brent – been following your stuff since I heard you on packetpushers but I must admit to some confusion…we’re coming along with SDN here at RIT but what is the deal with all the controllers? POX at GENI, then we had Floodlight and now OpenDaylight and OVS in the center of it all with distros changing faster than we can keep up.
What would you recommend for a reasonably stable collection of tools?
Hi Bruce, I more then empathize with you my friend as I was there not too long ago myself. I saw a trend of revolving fashionable controllers but none of them really did anything particularly useful because they are all in incubation. I include OpenDaylight in that comment also 🙂
So when OpenDaylight came around it differentiated itself for one reason alone, multi-vendor project under the Linux Foundation. It is lots of companies saying, we can’t keep investing in one-offs or thinking we can differentiate in a commodity like the SDN controller. Long story short, I support ODL because it is vendors with resources and a bit of community saying, we choose this and for the foreseeable future you can count on this platform being consistent.
Thanks for the thoughtful comments Bruce, its as important of a topic in the industry right now and one that only those with their sleeves rolled up experience.
Respect,
-Brent