From OpenFlow Wiki
Note: These instructions are for the 1.0.0 release. Please use the history tab to view older versions of this page.
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
Switch to Debian unstable. Add to /etc/apt/sources.list this line:
deb http://mirrors.kernel.org/debian/ unstable main contrib non-free
apt-get update && apt-get upgrade
This will takes a while as all the packages in your system are moved to unstable.
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 make libc6-dev autoconf automake autotools-dev
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.
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:
Verify the new kernel is at least 2.6.24 or greater.
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 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 Reload % sudo shutdown -r now
Update the OF_ROOT environment variable for your setup:
cd ~/ cp <openflow-dir>/regress/scripts/env_vars . vim env_vars
Login as root:
Load environment variables:
These can be automatically sourced upon login, by appending the preceding line to the ~/.bashrc file.
Load virtual ethernet pairs:
Verify ethernet pairs:
/sbin/ifconfig | more
You should see veth0..7 listed.
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:
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.