From OpenFlow Wiki
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 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~2.tar.gz tar xzf openflow-0.8.9~2.tar.gz cd openflow-0.8.9~2
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:
Verify the new kernel is at least 2.6.24 or greater.
Install required packages for the test suite:
sudo apt-get install liberror-perl libio-interface-perl liblist-moreutils-perl libpcap0.8-dev iproute libnet-rawip-perl 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 or sudo apt-get install sysv-rc-conf sysv-rc-conf avahi-daemon off
Disable IPv6, ND for IPv6 which also often causes tests to fail by sending NS/NA and RS/RA messages during tests:
Update blacklist.conf to disable IPv6 % sudo vi /etc/modprobe.d/blacklist 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 kernel-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.
To run the user-space tests: