| 74 |  | ==== Installing the !OpenFlow Reference System (old) ==== | 
          
            | 75 |  | While presented, it is not recommended to install from tarball.  | 
          
            | 76 |  | The detailed instructions may be found here: http://www.openflowswitch.org/wp/getstarted/ | 
          
            | 77 |  |  | 
          
            | 78 |  | 1. Download software and required packages. If using git:  | 
          
            | 79 |  | {{{ | 
          
            | 80 |  | sudo apt-get install git-core automake m4 pkg-config libtool | 
          
            | 81 |  | git clone http://openflowswitch.org/openflow | 
          
            | 82 |  | cd openflow | 
          
            | 83 |  | ./boot.sh | 
          
            | 84 |  | }}} | 
          
            | 85 |  | if installing from tarball: | 
          
            | 86 |  | {{{ | 
          
            | 87 |  | mkdir openflow | 
          
            | 88 |  | cd openflow | 
          
            | 89 |  | wget http://openflowswitch.org/downloads/openflow-0.9.0.tar.gz | 
          
            | 90 |  | tar xzf openflow-0.9.0.tar.gz | 
          
            | 91 |  | cd openflow-0.9.0 | 
          
            | 92 |  | sudo apt-get install gcc linux-headers-`uname -r` | 
          
            | 93 |  | }}} | 
          
            | 94 |  | 2. Make and install. | 
          
            | 95 |  | {{{ | 
          
            | 96 |  | ./configure --with-l26=/lib/modules/`uname -r`/build | 
          
            | 97 |  | make | 
          
            | 98 |  | make install | 
          
            | 99 |  | }}} | 
          
            | 100 |  |  | 
          
            | 101 |  | === Installing NOX  === | 
          
            | 102 |  | It is not only recommended but also much simpler to use git to install NOX. Therefore the following instructions assume you are using git. The full instructions are found at noxrepo.org:  http://noxrepo.org/manual/installation.html [[BR]] | 
          
            | 103 |  |  | 
          
            | 104 |  | ''' Dependencies ''' [[BR]] | 
          
            | 105 |  | NOX requires the following packages to be installed on the Console: | 
          
            | 106 |  |  * GNU Libtool (libtool) | 
          
            | 107 |  |  * Boost C++ libraries (libboost1.35-dev) | 
          
            | 108 |  |  * Apache HTTP Server (apache2) | 
          
            | 109 |  |  * Xerces C++ parser (libxerces-c28) | 
          
            | 110 |  |  * Xerces development files (libxerces-c2-dev) | 
          
            | 111 |  |  * SSL development libraries (libssl-dev) | 
          
            | 112 |  |  * SQLite 3 development files (libsqlite3-dev) | 
          
            | 113 |  |  * Simple JSON for Python (python-simplejson) | 
          
            | 114 |  | Note, this is with respect to the Console, not the node - you may need to install additional packages before NOX can be installed properly.  | 
          
            | 115 |  |  | 
          
            | 116 |  | If all dependencies are taken care of, NOX will install with the following steps.  | 
          
            | 117 |  | {{{ | 
          
            | 118 |  | git clone git://noxrepo.org/noxcore | 
          
            | 119 |  | cd noxcore/ | 
          
            | 120 |  | ./boot.sh | 
          
            | 121 |  | mkdir build/ | 
          
            | 122 |  | cd build/ | 
          
            | 123 |  | ../configure --with-python=yes | 
          
            | 124 |  | make | 
          
            | 125 |  | make check  | 
          
            | 126 |  | }}} | 
          
            | 127 |  |  | 
          
            | 128 |  |  | 
          
            | 129 |  | === Controllers on the Console ===  | 
          
            | 130 |  |  | 
          
            | 131 |  | A sub-set of these instructions can be used to install a "custom" controller in userspace on the console. Most of the requisite libraries should already be installed. Use the following commands to install the Reference system in your userspace:  | 
          
            | 132 |  |  | 
          
            | 133 |  | '''for the !OpenFlow Reference System :'''[[BR]] | 
          
            | 134 |  | {{{ | 
          
            | 135 |  | cd | 
          
            | 136 |  | git clone http://openflowswitch.org/openflow | 
          
            | 137 |  | cd openflow | 
          
            | 138 |  | ./boot.sh | 
          
            | 139 |  | ./configure --with-l26=/lib/modules/`uname -r`/build | 
          
            | 140 |  | make | 
          
            | 141 |  | make install | 
          
            | 142 |  | }}} | 
          
            | 143 |  |  | 
          
            | 144 |  | '''for NOX :'''[[BR]] | 
          
            | 145 |  | {{{ | 
          
            | 146 |  | cd | 
          
            | 147 |  | git clone git://noxrepo.org/noxcore | 
          
            | 148 |  | cd noxcore/ | 
          
            | 149 |  | ./boot.sh | 
          
            | 150 |  | mkdir build/ | 
          
            | 151 |  | cd build/ | 
          
            | 152 |  | ../configure --with-python=yes | 
          
            | 153 |  | make | 
          
            | 154 |  | make check  | 
          
            | 155 |  | }}} | 
          
            | 156 |  |  | 
          
            | 157 |  |  | 
          
            | 158 |  | === Starting the controller === | 
          
            | 159 |  | Both commands start the controller and establish a connection with the !OpenFlow switch. The -v is for verbose. -h for both will give you the help files for the controllers. In the reference system, the controller is found under .../openflow/controller/ | 
          
            | 160 |  | {{{ | 
          
            | 161 |  | ./controller -v ptcp:6633  | 
          
            | 162 |  | }}}  | 
          
            | 163 |  | and in NOX, it is found under .../noxcore/build/src/ | 
          
            | 164 |  | {{{ | 
          
            | 165 |  | ./nox-core -v -i ptcp:6633  | 
          
            | 166 |  | }}}  | 
          
            | 167 |  | `ptcp:6633` refers to a passive connection to TCP 6633, the default !OpenFlow port. An active connection method using standard TCP exists, however this does not work on this setup. In the !OpenFlow reference system, a log of the verbose output can be saved by appending `--log-file [filename]`.     | 
          
            | 168 |  |  | 
          
            | 169 |  | [[BR]] | 
          
            | 170 |  | [[BR]] | 
          
            | 171 |  |  | 
          
            | 172 |  | ---- | 
          
            | 173 |  | === Available Tools === | 
          
            | 174 |  |  | 
          
            | 175 |  | Some of these tools require root privileges and will thus require a custom installation on a node. Others can be run from the console directly in an unprivileged mode.  | 
          
            | 176 |  |  | 
          
            | 177 |  | ==== the Wireshark plugin ==== | 
          
            | 178 |  | The !OpenFlow Reference system comes with an !OpenFlow wireshark dissector.  | 
          
            | 179 |  |  | 
          
            | 180 |  | '''Permissions:''' [[BR]] | 
          
            | 181 |  | You must be root in order to use Wireshark; Therefore you must install it on a node. [[BR]] | 
          
            | 182 |  |  | 
          
            | 183 |  | '''Prerequisites:''' [[BR]] | 
          
            | 184 |  | glib (and of course, wireshark) is required for the plugin to work: | 
          
            | 185 |  | {{{ | 
          
            | 186 |  | apt-get install wireshark libgtk2.0-dev | 
          
            | 187 |  | }}} | 
          
            | 188 |  |  | 
          
            | 189 |  | '''Installation:'''[[BR]] | 
          
            | 190 |  | The patch is located under the utilities directory: | 
          
            | 191 |  | {{{ | 
          
            | 192 |  | cd utilities/wireshark_dissectors/openflow | 
          
            | 193 |  | make | 
          
            | 194 |  | sudo make install | 
          
            | 195 |  | }}}   | 
          
            | 196 |  |  | 
          
            | 197 |  | '''Usage:'''[[BR]] | 
          
            | 198 |  | To use wireshark, you need to do some X11 tunneling. To do this, add the -X option when using SSH to access the Console and the nodes.    | 
          
            | 199 |  |  | 
          
            | 200 |  | tcpdump pcap files can also be opened using wireshark - once the plugin has been installed, !OpenFlow packets can be interpreted from these files as well.   | 
          
            | 201 |  |  | 
          
            | 202 |  | ==== Iperf ==== | 
          
            | 203 |  | For performance testing, you may want to run some bandwidth tests. iperf is a tool that measures maximum network performance using TCP for throughput and UDP for jitter and datagram loss. The standard image used for the Sandbox nodes when booted with command `omf tell on` comes with iperf. To take measurements, you need at least two nodes. One node becomes the server, the other(s), clients. | 
          
            | 204 |  |  | 
          
            | 205 |  | '''Permissions:''' [[BR]] | 
          
            | 206 |  | Iperf does not require root access.  | 
          
            | 207 |  |  | 
          
            | 208 |  | '''Usage:'''[[BR]] | 
          
            | 209 |  | Initially, eth0 (the !OpenFlow interface for the nodes) will be disabled. Additionally, there is no DHCP service on that VLAN - you need to enable the interface and statically set the IP address (i.e. using ifconfig). 192.168.x.y is the block associated with the !OpenFlow VLAN.   | 
          
            | 210 |  |  | 
          
            | 211 |  | To start the server: | 
          
            | 212 |  | {{{ | 
          
            | 213 |  | iperf -s  | 
          
            | 214 |  | }}}    | 
          
            | 215 |  | and on the client: | 
          
            | 216 |  | {{{ | 
          
            | 217 |  | iperf -c 192.168.x.y  | 
          
            | 218 |  | }}} | 
          
            | 219 |  |  | 
          
            | 220 |  | Where 192.168.x.y is the IP address of the iperf server. A caveat is that iperf cannot take real-time bandwidth measurements. Real-time bandwidth use can be monitored using BWM-ng. | 
          
            | 221 |  |  | 
          
            | 222 |  | '''On the Console'''[[BR]] | 
          
            | 223 |  | Iperf is also installed on the Console. The interfaces available on the Console are the following: | 
          
            | 224 |  |  * eth1 - 192.168.100.28 | 
          
            | 225 |  |  * eth1.27 / Control - 10.19.0.10 | 
          
            | 226 |  |  * eth1.28 / OF virtual switch - 192.168.1.28 | 
          
            | 227 |  |  * eth1.100 / OFP interface - 172.16.100.1 | 
          
            | 228 |  |   | 
          
            | 229 |  | ==== BWM-ng ====  | 
          
            | 230 |  | BWM-ng is a tool capable of taking real-time throughput measurements of different interfaces of a host.   | 
          
            | 231 |  |  | 
          
            | 232 |  | '''Permissions:''' [[BR]] | 
          
            | 233 |  | BWM-ng does not require root access, and is installed on the Console.   | 
          
            | 234 |  |  | 
          
            | 235 |  | '''Usage:'''[[BR]] | 
          
            | 236 |  | By default, the tool will monitor all interfaces on the Console. To monitor just the !OpenFlow interface, you must specify `eth1.100`. To output this to a csv, use the following command:  | 
          
            | 237 |  | {{{ | 
          
            | 238 |  | bwm-ng -I eth1.100 -o csv -t 1000 -F <file-name> | 
          
            | 239 |  | }}}   | 
          
            | 240 |  |  * -I : interface | 
          
            | 241 |  |  * -o : output, either in csv or html | 
          
            | 242 |  |  * -t : specifies sampling rate in msec. Here, it is 1000 msec, or 1 sample/sec | 
          
            | 243 |  |  * -F : Filename of output | 
          
            | 244 |  |  | 
          
            | 245 |  | '''Installation on a node'''[[BR]] | 
          
            | 246 |  | The following command will install BWM-ng: | 
          
            | 247 |  | {{{ | 
          
            | 248 |  | apt-get install bwm-ng | 
          
            | 249 |  | }}} | 
          
            | 250 |  |  | 
          
            | 251 |  | ---- | 
          
            | 252 |  | ==== Development ==== | 
          
            | 253 |  | The files defining !OpenFlow Protocol can be found in the following locations: | 
          
            | 254 |  |  * !OpenFlow reference system:  openflow/include/openflow/openflow.h | 
          
            | 255 |  |  * NOX: noxcore/src/include/openflow.hh | 
          
            | 256 |  |  | 
          
            | 257 |  | In addition, NOX provides a [http://noxrepo.org/manual/app.html Web API] that allows you to do development in C++ or Python.  |