Fedora Install

From OpenFlow Wiki

Jump to: navigation, search

Contents

Fedora

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

Install Fedora

Sources for Fedora are available at http://www.fedoraproject.org.

These instructions were tested with Fedora 11, on i386.

For VM-based install, logging in via SSH lets you copy instructions from a web browser:

yum install openssh-server

Log in to your machine via SSH.

After installing, the only user available is root. Set up a user account:

/usr/sbin/adduser openflow

Set a password for this account:

passwd openflow

Install sudo:

yum install sudo

Add superuser privileges for this account:

/usr/sbin/visudo

Add this line below the line 'root ALL=(ALL) ALL'

openflow ALL=(ALL) NOPASSWD:ALL

Login as openflow:

exit 
ssh -X openflow@<machine_name>

The '-X' turns on X forwarding, so that wireshark can be displayed locally.

Install OpenFlow

Install from the Stanford Git repository:

sudo yum install git automake pkgconfig libtool gcc make

[Git install only] Download git repo with OpenFlow code and history.

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

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:

yum groupinstall "X Window System"
sudo yum install wireshark wireshark-gnome glib2-devel

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 the additional packages:

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

Update the OF_ROOT environment variable for your setup:

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

Remove or disable avahi, to prevent it from polluting the tests with link discovery packets:

sudo yum remove avahi
 or
sudo /sbin/chkconfig avahi-daemon off
sudo /etc/rc.d/init.d/avahi-daemon stop

Disable IPv6 , to prevent it from polluting the tests with link discovery packets:

vi disable-ipv6.sh

-- disable-ipv6.sh --
#!/bin/sh

IP6CONF=/proc/sys/net/ipv6/conf
for intf in ${IP6CONF}/*
do
        echo 1 > $intf/disable_ipv6
done
-- disable-ipv6.sh --

chmod 755 disable-ipv6.sh
sudo ./disable-ipv6.sh

To turn off LLDP on Fedora (if it's installed/running) you can try:

chkconfig ladvd off
service ladvd stop

Verify Install

Login as root:

su

Load environment variables:

source /home/openflow/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. If using X forwarding, you'll have to spawn the windows from the same user account that originally logged in. If you logged in as openflow and used 'su' to become root, spawn another terminal session to launch Wireshark:

ssh -X openflow@<machine_name>
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.

Back in the original root window, run user-space tests:

./disable-ipv6.sh
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.