Versions Compared

Key

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

Getting Started

...

Table of Contents

Table of Contents
outlinetrue
excludeTable of Contents

Introduction

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

Installation

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 1.7 and Ant. You can optionally choose to install eclipse but it is not 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 Xcode 4.0.2 (for 10.6 Snow Leopard) (includes gcc, make, git, etc.)
  • Java Development Kit 1.7: 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.

Windows

Floodlight is written in Java, so it should work in Windows; however, specific instructions are not provided. If you wish to use Windows, do so at your own risk or use our Floodlight Linux VM instead.

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
$ ant

$ sudo mkdir /var/lib/floodlight
$ sudo chmod 777 /var/lib/floodlight

...

Info
The above uses the master version of Floodlight. To use a specific version, specify the branch in the git step by appending -b <branch-name>.

Running Floodlight in the Terminal

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

...

Floodlight will start running and print log and debug output to your console. If you would like to save your log, you can redirect it to a file.

...

Eclipse IDE

Developing Floodlight in 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.

...

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.

Running Floodlight in Eclipse

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.

Simulating A Network

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.

...

Code Block
xml
xml
$ ssh -X floodlight@<vm-ip>
$ sudo wireshark

Next Steps

If you are finished the getting started guide, you may want to check out Floodlight for Developers, where you will find useful examples, tutorials, and information to help you get started as a Floodlight developer.