labs.beatcraft.com
OpenFlow

OpenFlow/mininet

To download mininet, please visit the URL below.
http://mininet.org/

mininet is a virtual network, which is established on a Linux environment. mininet consists of OpenFlow switches, OpenFlow controller, and a host, which is connected to switches. This virtual network environment allows to develop and test OpenFlow. Since mininet can be established on a Linux, which is running on a VM, the use of mininet is the simplest way to experiment how OpenFlow works on a network that highly resembles a working condition.

mininet setup

mininet's site distributes a VM, which is pre-configured for using mininet. The site recommend this VM for use. However, to understand all installed applications and to individually set up a network, the manual installation of mininet is recommended.

Go to http://mininet.org/download/, and perform Opetion 2: Native Installation on Ubuntu 12.04 LTS, which is established on a VMware, a VM.

This assumes that users install Ubuntu 12.04 Desktop amd64 on a VM, which VMware Player has created. Since it is used for a network environment, a server version is usually selected in such a case. However, since the analysis of network performance is measured by Wiredshark, the operation and analysis of a network is done by the same and single machine. Therefore, in this case, the desktop version is used.

Obtain a whole set of the source of mininet.

$ sudo apt-get install git-core
$ git clone git://github.com/mininet/mininet

The installation process is followed by the script of mininet/util/install.sh -a
Please refer the details of the installation process to the script of mininet/util/install.sh.

To select install.sh -a, the parts are listed below are executed.

  • Install kernel
  • Install the packages, which are required for building and configuring mininet
  • Configure sysctl
  • Install the reference implementation of OpenFlow
  • Delete avahi-daemon
  • Make IPv6 ineffective
  • Install Wireshark, which is used for analyzing OpenFlow
  • Install Open vSwitch
  • Install pox
  • Install oftest
  • Install cbench
  • Configure that other minor parts, which are not directly related to OpenFlow. To use install.sh, the installation process cannot be seen. To use install.sh -a, instead, all parts are individually installed, so the installation process of a single part can be recognized.

kernel install

kernel can be installed without any modification. The default kernel of Ubuntu 12.04 is version 3.2. This kernel supports the process-based network virtualization capabilities, which is required for running mininet.

Configuration of mininet

To install the packages, which are required for building and executing mininet.

$ sudo apt-get install gcc make screen psmisc xterm ssh iperf iproute telnet \
  python-setuptools python-networkx cgroup-bin ethtool help2man \
  pyflakes pylint pep8

Configuration of susctl

Add environment configurations for the network. (Increase network buffer.)

$ sudo -s
# cat ~/mininet/util/sysctl_addon >> /etc/sysctl.conf

Build and install mininet

$ cd ~/mininet
$ sudo make install

Install the reference implementation of OpenFlow

Install the packages, which are required for building and executing the reference implementation of OpenFlow.

$ cd ~
$ sudo apt-get install autoconf automake autotools-dev pkg-config \
  libtool libc6-dev

Install and build the reference implementation of OpenFlow.

$ git clone git://openflowswitch.org/openflow.git
$ cd ~/openflow
$ patch -p1 < ~/mininet/util/openflow-patches/controller.patch
$ ./boot.sh
$ ./configure
$ make
$ sudo make install

Delete avahi-daemon

To prevent unnecessary communications happening, avahi-daemon is deleted.

$ sudo apt-get remove avahi-daemon

Make IPv6 ineffective

Since only OpenFlow 1.2 or later Supports IPv6, make IPv6 ineffective.

$ sudo -s
# echo  'blacklist net-pf-10\nblacklist ipv6' >> /etc/modprobe.d/blacklist.conf

Install Wireshark

Install Wireshark and the plugins for Wireshark. The plugins are used for analyzing OpenFlow.

$ cd ~
$ sudo apt-get install wireshark libgtk2.0-dev scons mercurial libglib2.0-dev \
  libwiretap-dev libwireshark-dev
$ hg clone https://bitbucket.org/barnstorm/of-dissector
$ cd of-dissector/src
$ export WIRESHARK=/usr/include/wireshark
$ scons
$ sudo cp openflow.so /usr/lib/wireshark/libwireshark1/plugins/
$ mkdir -p ~/.wireshark
$ cp ~/mininet/util/colorfilters ~/.wireshark

Install Open vSwitch

Since Ubuntu 12.04 includes Open vSwitch packages, it is installed from the package rather than form its source.

$ sudo apt-get install openvswitch-datapath-dkms openvswitch-switch openvswitch-controller

After the installation is completed, to change the setting Open vSwitch to boot from mininet, the configuration of the daemon, which is specifically used during the booting time, should be suspended and disabled temporarily.

$ sudo service openvswitch-controller stop
$ sudo update-rc.d openvswitch-controller disable

Install POX

POX is installed for using as the controller of OpenFlow. PDX is just a python script, it should be placed at the certain directory. The specific installation is not required.

$ cd ~
$ git clone https://github.com/noxrepo/pox.git

Install OFTest

OFTest is a test tool for OpenFlow switch. OFTest can be downloaded form the uRL shown below.
http://www.projectfloodlight.org/oftest/
To install OFTest, please apply command lines shown below.

$ cd ~
$ sudo apt-get install tcpdump python-scapy
$ git clone git://github.com/floodlight/oftest
$ cd oftest
$ git checkout -b oft-1.1 remotes/origin/oft-1.1
$ cd tools/munger
$ sudo make install

Install Cbench

Cbench is a benchmark software for OpenFlow controller. Cbench is available at the URL shown below.
http://docs.projectfloodlight.org/display/floodlightcontroller/Cbench
To install Cbench, please follow the direction shown below.

$ cd ~
$ sudo apt-get install libsnmp-dev libpcap-dev libconfig-dev
$ git clone git://openflow.org/oflops.git
$ cd oflops
$ sh boot.sh
$ sh boot.sh &#8592; autoreconf &#12398;&#12456;&#12521;&#12540;&#23550;&#31574;&#12391; boot.sh &#12399;&#65298;&#22238;&#23455;&#34892;&#12377;&#12427;&#12290;
$ ./configure --with-openflow-src-dir=/home/beat/openflow
$ make
$ sudo make install


This is the end of creating a mininet environment. As all installations are completed, there are several directories are created under the home directory.

$ ls
mininet       oflops    openflow
of-dissector  oftest    pox

To reflect the configuration changes for the network, restart the system. This is ready to use.

To check its actual operation, please try OpenFlow Tutorial, which is located at openflow.org.
http://www.openflow.org/wk/index.php/OpenFlow_Tutorial
Opern/OpenFlow Tutorial 1

Revision History

  • 2013/08/28 This article is initially uploaded.

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2013-08-28 (Wed) 08:43:34 (1549d)