wiki:Documentation/fSDN/aSwitchImage

Version 1 (modified by akoshibe, 13 years ago) ( diff )

Installing Open vSwitch on a node

This page describes how to install Open vSwitch on a sandbox node. Open vSwitch is a software OpenFlow switch implementation designed to run on a PC. More information about the software can be found here. The docs provided online are a bit outdated at this point; The installation steps followed here is INSTALL.Linux, included with the Open vSwitch tarball (but attached to this page for your convenience).

1.Prerequisites

The node used here is a NetFPGA cube, the standard node for !SandBox9. The node was imaged with ubuntu.ndz, based on Ubuntu 10.10 (Maverick). A few steps are needed before we begin fetching the install file or any of its dependencies. On the node:

  1. In /etc/apt/sources.list, replace all instances of 'apt:9999' with 'us.archive.ubuntu.com'
  1. Install packages for Open Vswitch:
    apt-get update
    apt-get install pkg-config autoconf automake linux-libc-dev libtool
    
  1. Fetch and untar Open vSwitch (don't do anything to it yet):
    cd ~/
    wget http://openvswitch.org/releases/openvswitch-1.1.1.tar.gz
    tar -xf openvswitch-1.1.1.tar.gz
    
  1. Upgrade the kernel to 2.6.35-30, as 2.6.35-25's kernel header packages are broken (otherwise '2.6.35-30-generic' in the following commands can be replaced with `uname -r`).
    apt-get install linux-headers-2.6.35-30-generic linux-image-2.6.35-30-generic
    reboot
    apt-get install linux-source-2.6.35
    

When linux-image is installed, grub is updated so that the newest kernel is loaded automatically upon next reboot. Re-installing linux-source after reboot should install the proper version for the new kernel.

2. Installation

On Debian (and its variants), Open vSwitch must be built as a kernel module. If everything is sound, installing Open vSwitch should be little more than following the steps in INSTALL.Linux, found under the untarred Open vSwitch root directory.

cd ~/openvswitch-1.1.1
./boot.sh
./configure --with-l26=/lib/modules/`uname -r`/build
make
make install

2.1. Sanity checks

If things are not well, here are some things worth checking:

  1. Check /usr/src/linux-headers-`uname -r`/.config for the following kernel configs:
  • CONFIG_BRIDGE as module (=m)
  • NET_CLS_ACT, NET_CLS_U32, NET_SCH_INGRESS as modules or built-in (=m or =y, respectively) if policing
  • CONFIG_TUN if you need tunneling

Fix them as necessary.

  1. The bridge module should not be loaded (e.g. should not show up when you do lsmod | grep bridge); remove it if it is loaded. If it seems to be loaded at boot time, there may be an entry for it somewhere in /etc/modules.
  1. /lib/modules/$(uname -r)/build should be a link to the Linux kernel header directory:
    root@node1-1:~# ls -ald /lib/modules/$(uname -r)/build
    lrwxrwxrwx 1 root root 40 2011-07-26 13:41 /lib/modules/2.6.35-30-generic/build -> /usr/src/linux-headers-2.6.35-30-generic
    

This directory should contain (mostly) unbroken links. If not, repeat step 3 of the prerequisites with another kernel version.

References

The following links were referenced but aren't relevant overall; this is just for citation.

Attachments (1)

  • INSTALL.Linux (12.6 KB ) - added by akoshibe 13 years ago. OVS-1.1.1 install instruction

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.