Changes between Version 4 and Version 5 of Internal/OpenFlow/Controllers/FloodLight


Ignore:
Timestamp:
May 5, 2012, 5:27:33 AM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/Controllers/FloodLight

    v4 v5  
    11= The !FloodLight Controller. =
    2 !FloodLight is an open-source, Java-based controller maintained by !OpenFlowHub.
    3 == I. Installation. ==
     2!FloodLight is an open-source, Java-based controller maintained by !OpenFlowHub. [[BR]][[BR]]
     3This page is comprised of many notes that may be transient. Anything referencing links will be repeated for completeness. 
     4== Quick Links ==
     5 [#install Installation][[BR]]
     6 [#modding Adding functionality][[BR]]
     7 [#arch Architecture] - the section most likely to change as I figure things out/discover my own misconceptions. [[BR]]
     8 [#vm Floodlight/Mininet VM][[BR]]
     9== Installation. == #install
    410The following describes the installation of !FloodLight on an Ubuntu 11.04 (natty) system. Installation is described on their [http://floodlight.openflowhub.org/getting-started/ website], but will be repeated here. If you are using SSH, You may want X11 forwarding to be able to launch Eclipse later on.[[BR]]
    511
     
    3137 * Check the box for “Floodlight”. No other Projects should be present and none should be selected.
    3238 * Click Finish.
    33 Once imported, the controller may be run by right-clicking on Controller.java (net.floodlightcontroller.core.internal.Controller.java, found under src/main/java) and choosing Run As -> Java Application.
     39Once imported, the controller may be run by right-clicking on Controller.java (net.floodlightcontroller.core.internal.Controller.java, found under src/main/java) and doing the following:
     40 * Click Run->Run Configurations
     41 * Right Click Java Application->New
     42 * For Name use FloodlightLaunch
     43 * For Project use Floodlight
     44 * For Main use net.floodlightcontroller.core.Main
     45 * Click Apply
     46This creates a handle for launching Controller.java as an application. 
    3447[[BR]][[BR]]
    3548The learning switch is loaded by default. The controller listens on 0.0.0.0:6633 (host, all interfaces with an IP address).
    3649
    37 == II. Adding functionality. ==
    38 A base tutorial can be found [http://floodlight.openflowhub.org/developing-floodlight/ here]. The rough steps are the following:
     50== Adding functionality. == #modding
     51A base tutorial can be found [http://floodlight.openflowhub.org/developing-floodlight/ here]. The steps assume that you are using Eclipse. The rough steps are the following:
    3952 1. Create a new class under src/main/java, basing it off of a template, if it exists
    4053 2. Register the module so that it is loaded at startup. This involves adding the fully qualified module name to two files:
     
    4255  * ''' floodlightdefault.properties ''' - list of modules to be loaded at startup.
    4356
     57== Architecture == #arch
     58 * ref: http://www.openflowhub.org/display/floodlightcontroller/Advanced+Tutorial
     59The controller has two main components:
     60 * the core, which listens to !OpenFlow messages and dispatches events, and
     61 * secondary modules which handle the events e.g PACKET_INs.
     62The secondary modules register with the core module when the controller is starting up. They do everything from recording certain aspects of flows to providing a RESTful API to modifying the flow tables within switches. They may also export services to leverage other modules, such as the REST API.
    4463
     64=== Some module components ===
     65 * IFloodlightProviderService : Needed for listening to !OpenFlow messages by registering with the !FloodlightProvider.
     66 * getModuleDependencies() : in a module, the function to indicate dependencies to the module loader e.g the IFloodlightProviderService above.
     67 * init() : in a module, the function where contexts are defined for services that the module is dependent on. It seems to be similar to a constructor.
     68 * isCallbackOrderingPrereq(), isCallbackOrderingPostreq() : where the module should be in the message processing chain.
     69 * startUp() : in a module, defines external initializations associated with other modules to which it is dependent on.
     70 * receive() : defines what a module does when it receives an event e.g. the one specified in startUp().   
    4571
    46 = The Floodlight VM =
     72= The Floodlight VM = #vm
    4773This is a VM image geared towards VirtualBox containing a running floodlight instance, mininet, and wireshark. [[BR]]
    4874It can easily be run on qemu/kvm after conversion to `qcow2` with `qemu-img convert -O` and with the parameters used to run mininet.