Changes between Initial Version and Version 1 of Documentation/fSDN/aSwitchImage


Ignore:
Timestamp:
Jul 26, 2011, 7:41:02 PM (13 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/fSDN/aSwitchImage

    v1 v1  
     1= Installing Open vSwitch on a node =
     2This 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 [http://openvswitch.org/ 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).   
     3
     4== 1.Prerequisites ==
     5The 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:
     6
     71. In /etc/apt/sources.list, replace all instances of 'apt:9999' with 'us.archive.ubuntu.com'
     8
     92. Install packages for Open Vswitch:
     10{{{
     11apt-get update
     12apt-get install pkg-config autoconf automake linux-libc-dev libtool
     13}}}
     14
     153. Fetch and untar Open vSwitch (don't do anything to it yet):
     16{{{
     17cd ~/
     18wget http://openvswitch.org/releases/openvswitch-1.1.1.tar.gz
     19tar -xf openvswitch-1.1.1.tar.gz
     20}}}
     21
     224. 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`).
     23{{{
     24apt-get install linux-headers-2.6.35-30-generic linux-image-2.6.35-30-generic
     25reboot
     26apt-get install linux-source-2.6.35
     27}}}
     28When 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.
     29
     30== 2. Installation ==
     31On 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.
     32{{{
     33cd ~/openvswitch-1.1.1
     34./boot.sh
     35./configure --with-l26=/lib/modules/`uname -r`/build
     36make
     37make install
     38}}}
     39
     40== 2.1. Sanity checks ==
     41If things are not well, here are some things worth checking:
     42
     431. Check /usr/src/linux-headers-!`uname -r`/.config for the following kernel configs:
     44
     45 * CONFIG_BRIDGE as module (=m)
     46 * NET_CLS_ACT, NET_CLS_U32, NET_SCH_INGRESS as modules or built-in (=m or =y, respectively) if policing
     47 * CONFIG_TUN if you need tunneling
     48
     49Fix them as necessary.
     50
     512. 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.
     52
     533. /lib/modules/$(uname -r)/build should be a link to the Linux kernel header directory:
     54{{{
     55root@node1-1:~# ls -ald /lib/modules/$(uname -r)/build
     56lrwxrwxrwx 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
     57}}}
     58This directory should contain (mostly) unbroken links. If not, repeat step 3 of the prerequisites with another kernel version.
     59
     60== References ==
     61The following links were referenced but aren't relevant overall; this is just for citation.
     62
     63 * http://www.cyberciti.biz/tips/build-linux-kernel-module-against-installed-kernel-source-tree.html
     64 * http://forums.gentoo.org/viewtopic-t-118180-highlight-bridgeutils.html?sid=4d602c9e364130609caff99aa2a40c69
     65 * https://help.ubuntu.com/community/Kernel/Compile
     66 * http://ubuntuguide.net/ubuntu-11-04-upgrade-linux-kernel-to-2-6-39-0