Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Getting Started

Overview

Floodlight is Java-based and intended to run with standard jdk tools and ant and can optionally be run in Eclipse.

Prerequisites

Linux

  • 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 is not required required.
Code Block
xml
xml

sudo apt-get install build-essential default-jdk ant python-dev eclipse

...

Mac

  • Mac OS X 10.6 or higher: older versions may work but have not been tested
  • Xcode 4.1 (for 10.7 Lion)  or or Xcode 4.0.2 (for 10.6 Snow Leopard)   (includes gcc, make, git, etc.)
  • Java Development Kit: to install, just type type 'javac in ' in a Terminal; this should automatically install the JDK if it isn't already present
  • Eclipse (optional)

Note: Want to get started fast?  You You can set up an Ubuntu image on Amazon Amazon here and and add the above Linux dependencies.

Download And Build

Floodlight is simple to download from Github and build.

Code Block
xml
xml
$ git clone git://github.com/floodlight/floodlight.git
$ cd floodlight
$ git checkout fl-last-passed-build
$ ant

Note: This uses the latest stable version of Floodlight.

Running Floodlight

Assuming java is in your path, you can directly run the floodlight.jar file produced by ant.

Code Block
xml
xml
$ java -jar target/floodlight.jar

Floodlight will start running and print debug output to your console.

Setting Up Eclipse

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.

Code Block
xml
xml
$ ant eclipse;

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 Since we use a dynamic module loading system to run Floodlight,  we we must configure Eclipse to launch it in the correct manner.

Create the FloodlightLaunch target:

  • Click Click Run->Run Configurations
  • Right Click Click Java Application->New
  • For 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:
    Code Block
    xml
    xml
    $ 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.

...