The SOS controller is considered alpha quality and is still under active development.
Downloading, Installing, and Running
The SOS controller is hosted on GitHub as a special extended version of Floodlight and can be cloned using git. In a Linux terminal, get the source code:
$ git clone https: //github .com /rizard/SOSForFloodlight -b sos-13 |
Then, install any Floodlight prerequisites:
$ sudo apt-get install build-essential default-jdk ant python-dev eclipse |
After the prerequisites are installed, change directories into the cloned repository, and build the controller:
$ cd SOSForFloodlight $ ant $ sudo mkdir /var/lib/floodlight $ sudo chmod 777 /var/lib/floodlight |
Lastly, you can run the controller at any time by executing the compiled JAR file:
$ java -jar target /floodlight .jar |
If you would like to develop or run the controller within Eclipse, refer to these instructions.
To kill the controller (e.g. to stop and restart it), which is simply a Java process, use your favorite way of killing processes.
Playing with the Source Code
All source code for SOS can be found in the net.floodlightcontroller.sos Java package. The SOS module is located in net.floodlightcontroller.sos.SOS.java. All other classes in the package are data types defined for use in the SOS module.
At present, the controller module is fairly basic and consists of the following main components:
- Reacting to TCP packet-in events via the receive function
- Sending UDP information packets to agents via the sendInfoToAgent function
- Inserting flow mods to facilitate SOS via the many pushSOSFlow_* functions
- Sending packet-out messages to clients via the sendSrcSparkPacket and sendDstSparkPacket functions
- Detecting and logging SOS-related switch connection events by implementing and registering as an IOFSwitchListener
Future Plans
The SOS module is not very sophisticated at this point, although it gets the job done for basic deployments. Existing Floodlight services like routing and the device manager need to be used to automate the discovery of clients, agents, and the calculation of some flows.
Work also needs to be done to make it easier to turn SOS on, off, and whitelist the client connections we want to optimize. This can foreseeably be done by implementing a REST API.