Floodlight: A Java-based OpenFlow
Controller

            Michael Cohen
               11/11/11
Floodlight Overview



   Floodlight is a completely open, free, Apache-
   licensed Java-based OpenFlow controller.




The Floodlight projected emerged from
Beacon, a project created by David Erickson of
Stanford.
Why Floodlight?
• Java-based (forked from Beacon)

• Apache Licensed
   – A solid foundation for *any* purpose

• Pure java (no OSGI know how required)
   – Eclipse supported but not required

• Dead simple to build and run.
   – “ant” + “java –jar floodlight.jar”

• Tested and hardened in real environments
   – Physical OpenFlow switches and real networks
   – Code included in a commercial product from Big Switch Networks
Floodlight Programming Model
                                 Application
                                                  • Java Event
                                                    Listeners for
 Application    Application
                                                    OpenFlow
                              REST APIs
                              • switch stats        events
    PACKET_IN                 • counter values
    PACKET_OUT                • static flow add
    FLOW_MOD                    /remove
    FLOW_REMOVED
    …
                                                  • Extensible
    SwitchListener
                                                    REST APIs

               Floodlight
               Controller
Floodlight Architecture                                                                     REST APIs


Topology - Tracks links between hosts and
switches                                                           Java Listeners
Device Manager - Tracks devices in the network         Learning                        Static
(MACs, IPs, etc.)                                                       Hub
                                                        Switch                      FlowPusher
Storage - Abstraction layer for storing controller
storage. Memory is used today

Counter Store – Openflow + Floodlight stats

Routing / Forwarding – Core engine for                   Counter       Routing /
                                                                                         Web
storing, calculating paths and installing flows.          Store        Forward

Web - Rest APIs
                                                                         Device
Learning Switch - Example learning switch               Topology                       Storage
                                                                        Manager
application. Can replace Routing / Forwarding

Hub - Example hub application. Can replace           Floodlight
routing / forwarding
Example: A Simple Hub (pseudo-code)
public class Hub {

      public void startup() {
            Add Listener(PACKET_IN);
      }

      public void shutdown() {
            Remove Listener(PACKET_IN);
      }

      public Command receive (…) [
            Setup OFPP_FLOOD action;
            Write action to switch socket;
            return Command.CONTINUE;
      }

      public boolean isCallbackOrdering Preqreq(…) {
            // does anything need to be called before me?
            return False;
      }
}
Building and Running Floodlight
• Build
   – $ cd openflowj; ant;
   – $ cd ../floodlight; ant;


• Run
   – java –jar floodlight.jar



• That’s all there is to it…
Floodlight Roadmap
• Persistent storage

• Multi language support

• Static Flow Addition / Removal

• Richer API layer (both REST and Java event-
  based)
Interested in Learning More?
• Check out the website:
   – http://floodlight.openflowhub.org


• Join the mailing list:
   – http://groups.google.com/a/openflowhub.org/group/f
     loodlight-dev/topics
   – Or just email floodlight-dev@openflowhub.org

• Get the code:
   – http://floodlight.openflowhub.org/display/Floodlight/
     Floodlight+Downloads

Floodlight OpenFlow Controller Overview

  • 1.
    Floodlight: A Java-basedOpenFlow Controller Michael Cohen 11/11/11
  • 2.
    Floodlight Overview Floodlight is a completely open, free, Apache- licensed Java-based OpenFlow controller. The Floodlight projected emerged from Beacon, a project created by David Erickson of Stanford.
  • 3.
    Why Floodlight? • Java-based(forked from Beacon) • Apache Licensed – A solid foundation for *any* purpose • Pure java (no OSGI know how required) – Eclipse supported but not required • Dead simple to build and run. – “ant” + “java –jar floodlight.jar” • Tested and hardened in real environments – Physical OpenFlow switches and real networks – Code included in a commercial product from Big Switch Networks
  • 4.
    Floodlight Programming Model Application • Java Event Listeners for Application Application OpenFlow REST APIs • switch stats events PACKET_IN • counter values PACKET_OUT • static flow add FLOW_MOD /remove FLOW_REMOVED … • Extensible SwitchListener REST APIs Floodlight Controller
  • 5.
    Floodlight Architecture REST APIs Topology - Tracks links between hosts and switches Java Listeners Device Manager - Tracks devices in the network Learning Static (MACs, IPs, etc.) Hub Switch FlowPusher Storage - Abstraction layer for storing controller storage. Memory is used today Counter Store – Openflow + Floodlight stats Routing / Forwarding – Core engine for Counter Routing / Web storing, calculating paths and installing flows. Store Forward Web - Rest APIs Device Learning Switch - Example learning switch Topology Storage Manager application. Can replace Routing / Forwarding Hub - Example hub application. Can replace Floodlight routing / forwarding
  • 6.
    Example: A SimpleHub (pseudo-code) public class Hub { public void startup() { Add Listener(PACKET_IN); } public void shutdown() { Remove Listener(PACKET_IN); } public Command receive (…) [ Setup OFPP_FLOOD action; Write action to switch socket; return Command.CONTINUE; } public boolean isCallbackOrdering Preqreq(…) { // does anything need to be called before me? return False; } }
  • 7.
    Building and RunningFloodlight • Build – $ cd openflowj; ant; – $ cd ../floodlight; ant; • Run – java –jar floodlight.jar • That’s all there is to it…
  • 8.
    Floodlight Roadmap • Persistentstorage • Multi language support • Static Flow Addition / Removal • Richer API layer (both REST and Java event- based)
  • 9.
    Interested in LearningMore? • Check out the website: – http://floodlight.openflowhub.org • Join the mailing list: – http://groups.google.com/a/openflowhub.org/group/f loodlight-dev/topics – Or just email floodlight-dev@openflowhub.org • Get the code: – http://floodlight.openflowhub.org/display/Floodlight/ Floodlight+Downloads