Floodlight is Java-based and intended to run with standard jdk tools and ant and can optionally be run in Eclipse.
Linux
sudo apt-get install build-essential default-jdk ant python-dev eclipse |
Mac
Note: Want to get started fast? You can set up an Ubuntu image on Amazon here and add the above Linux dependencies.
Floodlight is simple to download from Github and build.
$ git clone git://github.com/floodlight/floodlight.git $ cd floodlight $ ant |
Note: This uses the master version of Floodlight.
Assuming java is in your path, you can directly run the floodlight.jar file produced by ant.
$ java -jar target/floodlight.jar |
Floodlight will start running and print debug output to your console.
Its also possible to setup, develop and run Floodlight through Eclipse. Rather than setting up projects manually, its easily to use the Eclipse ant target.
$ ant eclipse |
This creates several files: Floodlight.launch, Floodlight_junit.launch, .classpath, and .project. From these you can setup a new Eclipse project.
You now have a working Eclipse project for Floodlight. You can run the project directly through Eclipse as well. Since we use a dynamic module loading system to run Floodlight, we must configure Eclipse to launch it in the correct manner.
Create the FloodlightLaunch target:
To then run Floodlight click on the drop-down arrow next to the Play button and select the proper target to run. These also work with debug targets.
Now that Floodlight is running, you need to attach it to an OpenFlow network. One of the best tools for this is Mininet, a network simulation tool.
$ sudo mn --controller=remote --ip=<controller ip> --port=<openFlowPort 6633 by default> |
Optionally run wireshark over ssh. Listen on "eth0? and filter for packets with "of" names.
$ ssh -X floodlight@<vm-ip> $ sudo wireshark |
If you are finished the getting started guide, you may want to check out Developing Floodlight where you will find a few simple coding examples.