Changes between Version 48 and Version 49 of Internal/OpenFlow/HostSetup
- Timestamp:
- Sep 27, 2011, 6:43:08 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/OpenFlow/HostSetup
v48 v49 1 1 [wiki:Internal/OpenFlow/ return to OpenFlow index] 2 = NetFPGA !OpenFlow switch = 3 According to the guides, !OpenVswitch provides a kenel implementation of the OF switch, whereas Stanford's reference switch is purely userspace. The former is faster, the latter more customizable. 4 2 = NetFPGA Host Setup = 5 3 This is the latest set of instructions for installing NetFPGA drivers on Ubuntu (10.10), and making it work as an !OpenFlow switch. It is assumed that your working directory is /opt/. 6 == I. NetFPGA setup == 4 == I. NetFPGA setup == #sec1 5 This section describes the steps required to build v.2.2.0 of the NetFPGA kernel module on Ubuntu. The same steps can be used to build more recent versions. Steps to build the older version of the drivers can be found [#old here]. 7 6 === 1.1 Download sources/dependencies === 8 7 `cd` to /opt/ and fetch the following: … … 21 20 apt-get install build-essential linux-headers-`uname -r` ncurses-dev libnet1-dev libxml-simple-perl libio-interface-perl liblist-moreutils-perl liberror-perl git-core libpcap0.8 libpcap0.8-dev 22 21 }}} 22 23 23 === 1.2 Compatibility fixes === 24 24 The following changes have to be made in order to compile the drivers on Ubuntu. … … 94 94 }}} 95 95 96 == II. !OpenFlow setup == 96 == II. NetFPGA !OpenFlow switch == 97 The above instructions apply to any recent version of NetFPGA driver (v2.1.2 - 3.0.0). The following steps are needed in order to use the NetFPGA as an !OpenFlow switch supporting v1.0 of the !OpenFlow protocol. While any version of the NetFPGA drivers /should/ work, the !OpenFlow components were built atop '''v2.2.0 of the NetFPGA drivers'''. 98 99 These instructions assume that you have already gotten the NetFPGA up and running on an Ubuntu box, as per [#sec1 section 1 of this guide]. 100 101 According to the guides, !OpenVswitch provides a kernel implementation of the OF switch, whereas Stanford's reference switch is purely userspace. The former is faster, the latter more customizable. The NetFPGA !OpenFlow switch utilizes the latter, but can probably be used with !OpenVswitch as well (though yet to be tested with a node). 97 102 === 2.1 dependencies === 98 * packages:103 * Install dependencies : 99 104 {{{ 100 105 apt-get install autoconf libtool … … 108 113 }}} 109 114 === 2.2 build !OpenFlow === 115 All bitfiles belong in the directory /opt/openflow/hw-lib/nf2. Steps 3 and 4 below download the !OpenFlow switch bitfiles into this directory. 110 116 {{{ 111 117 ./boot.sh … … 114 120 tar zxvf openflow_switch.bit.100_3.tar.gz ==> we need newer one from NF site:http://www.netfpga.org/releases/netfpga_openflow_switch_1_0_0-3.tar.gz 115 121 cd ../../ 116 ./configure --enable-hw- tables=nf2122 ./configure --enable-hw-lib=nf2 117 123 make 118 124 make install 119 125 }}} 120 126 121 After compilation, copy of_start.sh and of_stop.sh from /opt/netfpga/projects/openflow_switch/sw/. 127 After compilation, copy of_start.sh and of_stop.sh from /opt/netfpga/projects/openflow_switch/sw/. Given that you have a !OpenFlow controller up and running, you can connect the switch to the controller with the following: 128 {{{ 129 ./of_start.sh x.x.x.x:6633 130 }}} 131 Where x.x.x.x is the controller's IP address and 6633 the control port number. This automatically generates a random DPID for the switch; if you want to specify a DPID, modify the script such that `ofdatapath` takes the `-d` parameter for DPID, e.g: 132 {{{ 133 /opt/openflow/udatapath/ofdatapath --detach punix:/var/run/dp0 -d 001010222324 -i nf2c0,nf2c1,nf2c2,nf2c3 134 }}} 135 making it so that the DPID can be taken as an argument to the command-line is left as an exercise to the reader. 136 137 `./of_stop.sh` turns the !OpenFlow components off. 122 138 123 139 ---- 124 See below for old instructions.125 140 ---- 126 = Setting up NetFPGA hosts: Ubuntu 10.04 = 141 ''' The following are outdated, follow with caution ''' 142 143 = Setting up NetFPGA hosts: Ubuntu 10.04 = #old 127 144 Current Ubuntu NetFPGAs run Ubuntu version 8.04 and !OpenFlow ver. 1.0. Here we try to move to newer distributions w/ !OpenFlow Ver. 1.0. The hardware we use here is the NetFPGA cube, another version of the NetFPGA pre-built solution. As per the [http://www.openflowswitch.org/wk/index.php/CentOS_NetFPGA_Install !OpenFlow portion of the setup], a user named 'openflow' with root privs was added for this purpose. 128 145