Skip to content

Author: castroflaviojr

OpenDaylight Tutorial – Installation

The first official release of OpenDaylight, HYDROGEN,  is available for download at their website since February 4, 2014. It is a promise among the SDN controllers. It is an Open source project, and a lot of huge colaborators are part of it, like Cisco and Juniper.

Cisco have already brought to the market a comercial version of it. The Cisco XNC 1.5 has a few more features than ODL such as interface with Cisco OnePK and it is part of the Cisco ONE (Open Network Environment).

Still, the ODL controller is a big name and in this series of tutorial posts we will go through installation and configuration of basic functionalities.

Installation

If you just want to be introduced to the ODL the easiest way to install it is not actualy to installing it. Instead just download this VM with all the required code you need to run it.

You can easily deploy this VM on Virtualbox, or VMware Workstation. Source: HERE.

Ps.: If you want to actually install it, you can follow this tutorial. In the future I will post a tutorial with ODL installation for developing purpose.

Configuration comes next.

Leave a Comment

Ofdissector: A way to analyze OpenFlow packets in Wireshark at Ubuntu 12.04

As you start messing around in the Software-Defined Networking area you might want to analyze OpenFlow packets in Wireshark. This post is a installation tutorial of ofdissector, a plugin to analyze OpenFlow 1.3 packets in Wireshark.

The guys from CPqD have developed a plugin called ofdissector that is capable of doing that. In this post I am going to report the troubleshooting I had to do to make it work. The main problem was to make Wireshark to be able of analyzing OF 1.3. The original installation guide is linked here.

What worked?

I started by following this tutorial and finally came up with this successful installation script :

cd  $HOME/
git clone git://github.com/mininet/mininet
mininet/util/install.sh -n3f
sudo -s
apt-get install scons
git clone https://github.com/CPqD/ofdissector    
cd ofdissector/src
export WIRESHARK=/usr/include/wireshark
scons install

Troubleshooting:

The first problem I had was not being able to install ofdissector correctly. Adding the sudo -s command made things better I don’t know why exactly. But before I was having the following error:

scons: Reading SConscript files ...
### ERROR: You need to set the WIRESHARK environment variable to the
location of your wireshark include directory.
### ERROR: (such that epan/packet.h is a valid include path)

The seconde problem I had was conflicting installations of different versions of ofdissector. I installed both versions. You can avoid the problem by not installing the oldversion of ofdissector, using the following line of code instead of the wrong one:

##This is Right!!!
mininet/util/install.sh -n3f
##This is WRONG!!
mininet/util/install.sh -n3fxw
## the w option will install the wireshark plugin for OF1.0

Anyway, if you install both and fall into this problem:

 Err Duplicate protocol name "OpenFlow Protocol"! This might be caused by an inappropriate plugin or a development error.

The only thing you have to do is to remove the old openflow plugin and reinstall the new ofdissector by doing this:

sudo -s
rm -f /usr/lib/wireshark/libwireshark1/plugins/openflow.so
cd $HOME/ofdissector/src
export WIRESHARK=/usr/include/wireshark
scons install

That’s it. Feel free to report issues with the installation script.

2 Comments

Easiest way to install RouteFlow.

So I’ve struggled the whole day to install RouteFlow and I just want to post my results here.

The easiest way to use RouteFlow is to download a pre-built vm from this ftp:
ftp.cpqd.com.br/pub/routeflow/RouteFlow.zip

I tried to build it from source code several times and only succeeded when I created a clean Ubuntu 12.04 VM from scratch. https://github.com/CPqD/RouteFlow

I tried to build the source code on a machine that I used for mininet 2.1, 2.0, and it didn’t work, I guess that the Ubuntu version really makes a difference. But that’s only a guess.

That’s it.

Thanks

Leave a Comment

Learning Switch tutorial on Ryu + OVS 2.0 + OF 1.3

This tutorial aims to make you get in touch with some subtleties of the OpenFlow 1.3. The requirements for this tutorial are:

  • Mininet 2.1 (If you haven’t installed it yet, follow this link)
  • Ryu (If you haven’t installed it yet, follow this link)
  • OpenVSwitch 2.0 (If you haven’t installed it yet, follow this link)
  • Openflow 1.3 (If you haven’t installed it yet, follow this link)

So this tutorial will follow these steps:

  1. Test OVS 2.0 + RYU(OF1.0)
  2. Test MN user’s switch + MN controller. ( Verify it doesn’t work.)
  3. Test OVS 2.0 +MN controller. ( Verify it works)
  4. Test MN user’s switch + RYU (OF1.0). ( Verify it doesn’t work.)
  5. Test MN user’s switch + RYU (OF1.3). ( Verify works fine.)
  6. Test OVS 2.0 (OF1.0) + RYU (OF1.3)
  7. Test OVS 2.0 (OF1.3) + RYU (OF1.3)
  8. Conclude OVS 2.0 (OF1.0+1.3) + RYU (OF1.3) rules!

SO, in this tutorial we will test several scenarios. The initial problem we faced with OF1.3 was negotiation. Basically, if controller and switch don’t match versions they won’t talk, and won’t work.

I will give you the best solution in advance, then if you want to understand a lil better you can read the article to the end. The best solution is to enable OVS 2.0 switches to work with all versions of OF AND make sure RYU is running the right code.

Start ryu with OF13. (Note in line 20 of the code that Ryu imports OF13)

cd ryu
 PYTHONPATH=. ./bin/ryu-manager ryu/app/simple_switch_13.py

Start Mininet:

sudo mn --topo linear,4 --mac --switch ovsk --controller remote
h1 ping h4

Enable OpenFlow 1.3 in the switches. ( you need to open a new terminal with xterm s1 for that)

ovs-vsctl set bridge s1 protocols=OpenFlow10,OpenFlow13
ovs-vsctl set bridge s2 protocols=OpenFlow10,OpenFlow13
ovs-vsctl set bridge s3 protocols=OpenFlow10,OpenFlow13
ovs-vsctl set bridge s4 protocols=OpenFlow10,OpenFlow13

The article is not finished haha, I will finish it ASAP.

3 Comments

Setting up OpenVswitch 2.0 + Mininet 2.1+ Ubuntu 13.04

I’ve been struggling trying to set up the OVS 2.0 with Mininet 2.1 on Ubuntu 13.04 and after installing it, it would work fine but after rebooting the OS the OVS didn’t work I don’t know why yet.

So, What did I do to fix it? This:

After searching around the internet a found this article which didn’t work completely, but after I found this one with a few changes in the OVS-something syntax I thought it would work fine but it still didn’t.

I did this exactly to install:

sudo -s
apt-get update
apt-get install -y git automake autoconf gcc uml-utilities libtool build-essential git pkg-config linux-headers-`uname -r`
wget http://openvswitch.org/releases/openvswitch-2.0.1.tar.gz
tar zxvf openvswitch-2.0.1.tar.gz
cd openvswitch-2.0.1
./boot.sh
./configure --with-linux=/lib/modules/`uname -r`/build
make && make install
insmod datapath/linux/openvswitch.ko
mkdir -p /usr/local/etc/openvswitch
ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
ovsdb-server -v --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--pidfile --detach --log-file
ovs-vsctl --no-wait init
ovs-vswitchd --pidfile --detach
ovs-vsctl show

So, finally I decided to do this everytime I perform a reboot:

sudo -s
cd openvswitch-2.0.1
ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
ovsdb-server -v --remote=punix:/usr/local/var/run/openvswitch/db.sock \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
--private-key=db:Open_vSwitch,SSL,private_key \
--certificate=db:Open_vSwitch,SSL,certificate \
--pidfile --detach --log-file
ovs-vsctl --no-wait init
ovs-vswitchd --pidfile --detach
ovs-vsctl show

If this does not work for you, please report me your issue . I will do my best to help you!

Regards,

4 Comments