DocumentsDownloadsWikiCommunityBlogAbout

Debian Install

From OpenFlow Wiki

Jump to: navigation, search

Contents

Debian Unstable

Install Debian

Sources for Debian are at http://www.debian.org/releases/stable/debian-installer/

To minimize the size of your install, at the expense of having to install a few extra packages, do not use a network mirror during the Debian install process. This will force a minimum-size install.

Suggested for VM-based installs, so that these instructions can be copied from a web browser:

sudo apt-get -y install ssh
<ssh into your VM>

Convert to Unstable

If installing from a CD, remove the CD sources from /etc/apt/sources.list

vim /etc/apt/sources.list 

Switch to Debian unstable. Add to /etc/apt/sources.list this line:

deb http://mirrors.kernel.org/debian/ unstable main contrib non-free

then:

apt-get update && apt-get upgrade

This will takes a while as all the packages in your system are moved to unstable.

Install OpenFlow

Install from the Stanford Git repository:

sudo apt-get install git-core automake m4 pkg-config libtool
git clone http://openflowswitch.org/openflow
cd openflow
./boot.sh

Or, to install from tarball (not recommended - harder to pull new updates and contribute code):

wget http://openflowswitch.org/downloads/openflow-0.8.9.tar.gz
tar xzf openflow-v0.8.9.tar.gz
cd openflow-v0.8.9

Download required packages for compiling OpenFlow and building kernel modules:

sudo apt-get install gcc libc6-dev linux-headers-`uname -r`

Build OpenFlow user-space and kernel-space switches:

./configure --with-l26=/lib/modules/`uname -r`/build
make
sudo make install

Install Wireshark Dissector

The OpenFlow Wireshark Dissector is included in the standard OpenFlow distribution. It requires one additional library, plus the Wireshark package.

Install Wireshark and glib:

sudo apt-get install wireshark libgtk2.0-dev

Make and install:

cd utilities/wireshark_dissectors/openflow
make
sudo make install

Install Regression Suite

The OpenFlow Regression Suite is also included in the standard OpenFlow distribution. It requires a few additional packages and some environment variables.

Search for the latest linux-headers and linux-image packages:

apt-cache search linux-headers
apt-cache search linux-image

Install linux-headers and linux-image packages; below are examples:

sudo apt-get -y install linux-headers-2.6.26-1-486 linux-image-2.6.26-1-486 

To run the latest linux-image package, reboot into the new kernel:

sudo /sbin/reboot

Verify the new kernel is at least 2.6.24 or greater.

uname -r

Install required packages for the test suite:

sudo apt-get install liberror-perl libio-interface-perl liblist-moreutils-perl libpcap0.8-dev iproute
cd regress
sudo scripts/install_perlmods_apt.pl

Remove avahi-daemon, which often causes tests to fail by sending out messages during tests:

sudo apt-get remove avahi-daemon

Update the OF_ROOT environment variable for your setup:

cd ~/
cp <openflow-dir>/regress/scripts/env_vars .
vim env_vars

Verify Install

Login as root:

su

Load environment variables:

source ~/env_vars

These can be automatically sourced upon login, by appending the preceding line to the ~/.bashrc file.

Load virtual ethernet pairs:

veth_setup.pl

Verify ethernet pairs:

/sbin/ifconfig | more

You should see veth0..7 listed.

Start Wireshark:

wireshark &

In the Filter bar at the top, enter:

of || tcp.flags.reset == 1

Starting recording packets: go to Capture->Interfaces and select the lo (loopback) interface.

Run kernel-space tests:

of_kmod_veth_test.pl

You should now see OpenFlow packets going between the switch and the controller while the test suite runs. TCP reset packets separate each test. You can click on the OpenFlow portion of each packet and identify its fields.

At this point, you've verified the installation.

To run the user-space tests:

of_user_veth_test.pl
Copyright 2008 by the OpenFlow Consortium. All rights reserved. Powered by MediaWiki and WordPress.