The SOS agent code was implemented by Aaron Rosen – a past Masters student and member of our group. General instructions for the installation of the agent code can be found on Aaron's GitHub page, but are summarized and clarified here. Please do not follow the instructions on Aaron's page, since we have modified the project since then. The agent code will still be sourced from his repository though.
Table of Contents | ||
---|---|---|
|
Installing the Agent Software
...
Code Block | ||
---|---|---|
| ||
$ git clone http://github.com/aaronoroson/SteroidOpenFlowService.git
$ cd SteroidOpenFlowService
$ git submodule init
$ git submodule update
$ cd sos-agent
$ sudo apt-get install clang uuid-dev libxml2-dev -y
$ make |
Installing Open vSwitch
At this point, the agent code has been compiled and is ready to go. Before we can use it with the controller, we need to also install Open vSwitch (OVS) on the agent machine. The purpose of OVS is to perform packet header rewrite operations not currently possible on hardware switches.
...
Code Block | ||
---|---|---|
| ||
$ sudo apt-get install pkg-config autoconf automake linux-libc-dev libtool libssl-dev linux-headers-`uname -r` -y $ sudo wget http://openvswitch.org/releases/openvswitch-2.3.2.tar.gz $ sudo tar -xvzf openvswitch-2.3.2.tar.gz $ cd openvswitch-2.3.2 $ ./boot.sh $ ./configure --with-linux=/lib/modules/`uname -r`/build $ make $ sudo make install $ sudo make modules_install $ sudo modprobe openvswitch $ sudo mkdir -p /usr/local/etc/openvswitch/ $ sudo ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema |
Running Open vSwitch
The following will need to be started in order to use OVS:
...
These should always be run prior to attempting to use OVS. Without these prerequisite commands, OVS will likely report an error stating something along the lines of "unable to connect to database."
Configuring the Open vSwitch Bridge
The agent code running on the agent machine will communicate with devices on the data plane via an OVS bridge. This will allow us to exert control over the packets traversing to and from the agent. We can use OVS's virtual switch control program to instantiate a bridge:
...
Then, we can set the DPID of the OVS bridge to something that's easier to remember. This is not required; however, it makes it easier to reason with the topology and to debug if necessary. Note that this same DPID should be used when configuring the controller with this agent bridge.
Code Block | ||
---|---|---|
| ||
$ ovs-vsctl set bridge br_ovs other-config:datapath-id=0011223344556677 |
...
Code Block | ||
---|---|---|
| ||
$ sudo route -n |
Running the Agent Software
After all the prior steps are complete, the agent code is ready to run! Running it is very straightforward:
...