Floodlight is Java-based and intended to run with standard jdk tools and ant and can optionally be run in Eclipse.
- Ubuntu 10.04 (Natty) or higher. (Has been run with Ubuntu 10.04 with Ant versions 1.8.1 or lower).
- Install JDK, Ant. You can optionally choose to install eclipse but it is not required.
- Mac OS X 10.6 or higher: older versions may work but have not been tested
- Xcode 4.1 (for 10.7 Lion) or Xcode 4.0.2 (for 10.6 Snow Leopard) (includes gcc, make, git, etc.)
- Java Development Kit: to install, just type 'javac' in a Terminal; this should automatically install the JDK if it isn’t already present
- Eclipse (optional)
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.
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.
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.
This creates several files: Floodlight.launch, Floodlight_junit.launch, .classpath, and .project. From these you can setup a new Eclipse project.
- Open eclipse and create a new workspace
- File -> Import -> General -> Existing Projects into Workspace. Then click “Next”.
- From “Select root directory” click “Browse”. Select the parent directory where you placed floodlight earlier.
- Check the box for “Floodlight”. No other Projects should be present and none should be selected.
- Click Finish.
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:
- Click Run->Run Configurations
- Right Click Java Application->New
- For Name use FloodlightLaunch
- For Project use Floodlight
- For Main use net.floodlightcontroller.core.Main
- Click Apply
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.
- Download the Floodlight VM. It includes floodlight running by default and Mininet.
- Start it in VMware Fusion (set up new VM with provided vmdk) or VirtualBox (run floodlightcontroller.vbox.sh, click "Network tab" in VirtualBox GUI and OK before powering up - avoid running script from path with space in name, like "../VirtualBox VMs/..")
- Login (username is floodlight and no password is required)
- Its possible to run Mininet against the locally running Floodlight (just type “sudo mn”) but you can also run it against a remote controller you built as well. To do that, type:
Optionally run wireshark over ssh. Listen on “eth0″ and filter for packets with “of” names.
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.