Ubuntu Install

From OpenFlow Wiki

Jump to: navigation, search

Contents

Ubuntu

Note: These instructions are for the 1.0.0 release. Please use the history tab to view older versions of this page.

Install Ubuntu

Download the Ubuntu 9.10 Desktop or Server ISO from [1], and install Ubuntu.

To minimize the size of a VM-based install, download the Ubuntu server ISO image, boot from it, press F4 on Indoor Water Features the first screen and select "Install a minimal virtual machine".

Install OpenFlow

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>

Install from the Stanford Git repository:

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

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

wget http://openflow.org/downloads/openflow-1.0.0.tar.gz
tar xzf openflow-1.0.0.tar.gz
cd openflow-1.0.0

Download required packages for compiling OpenFlow:

sudo apt-get install gcc

Build OpenFlow user-space switch:

./configure
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.

Install required packages for the test suite:

cd ~/<your openflow-dir>
sudo regress/scripts/install_deps.pl

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

sudo apt-get remove avahi-daemon
 or
sudo apt-get install sysv-rc-conf
sudo sysv-rc-conf avahi-daemon off

Disable IPv6, which often causes tests to fail by sending out messages during tests:

Update sysctl.conf to disable IPv6

% sudo vi /etc/sysctl.conf
 
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Update blacklist.conf to disable IPv6

% sudo vi /etc/modprobe.d/blacklist.conf
 
blacklist net-pf-10
blacklist ipv6

Then reload system

% sudo shutdown -r now

Update the OF_ROOT environment variable for your setup:

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

Set root password, if you haven't already done so:

sudo passwd root

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 user-space tests:

of_user_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.