= An attempt at Floodlight Development. = This page documents the (attempted) process of developing a version of Floodlight with !FlowVisor-like slicing capabilities. This is an on-going process - therefore this page will be updated frequently. == Overview. == ''Slicing'' is the SDN (in our case referring to !OpenFlow) term for network virtualization. Specifically, A slice is a SDN controller and the network resources allocated to it by a hypervisor-like entity such as !FlowVisor. With proper resource isolation and allocation, multiple controllers can coexist on a single physical network. In the usual case, !FlowVisor behaves as a proxy, intercepting and modifying the !OpenFlow control messages between the switches and the multiple controllers so that each slice only sees a subset of the network. Floodlight is a modularized !OpenFlow controller, in that its functional components can be split into two major parts: 1. The core event dispatcher, and 2. The various event handlers. The event handlers (Floodlight modules) are what define the behavior of swicthes (hub, learning switch, router, etc.). A more in-depth discussion of these components can be found [http://www.orbit-lab.org/wiki/Internal/OpenFlow/Controllers/FloodLight#arch here]. The key point here is that Floodlight's modular structure allows for multiple different handlers to coexist, with various (groups of) modules imposing different capabilities on the switches. If these modules controlled different groups of switches e.g. had their own bit of resource, each set can be viewed as a slice. Floodlight does not currently have this capability, so the objective of the process described here is to try to realize this feature. == Setup == Development is done on two VMs, one for Flowvisor and Floodlight source, and the other, Mininet for testing our code. * '''VM1(10.50.250.2):''' 3-switch, 3-host Mininet topology pointed to external controller in VM2: Topology: {{{ h4 h5 h6 | | | s1---s2---s3 }}} Mininet config: {{{ # mn --topo=linear,3 --controller=remote --ip=10.50.250.17 --port=6633 }}} * '''VM2(10.50.250.17):''' Flowvisor on port 6633, with a slice to point two switches to Floodlight instance on 6634 !FlowVisor configuration: {{{ # fvctl createSlice fl-1 tcp:localhost:6634 foo@sampledomain.org # fvctl addFlowSpace 00:00:00:00:00:00:00:02 1000 any "Slice:fl-1=7" # fvctl addFlowSpace 00:00:00:00:00:00:00:01 1000 any "Slice:fl-1=7" }}} Floodlight config alteration (in src/main/resources/config.properties): {{{ net.floodlightcontroller.restserver.RestApiServer.port = 8088 net.floodlightcontroller.core.FloodlightProvider.openflowport = 6634 }}} The REST API port is changed from 8080 to prevent conflict with Flowvisor's services. == Approach == The general flow of operation needed is the following: 1. The Acceptor (OFSwitchAcceptor) listens for all OFTypes (!OpenFlow message types) and all switch join/leave events. 2. When a new switch joins, the Acceptor hands the switch's connection to a Classifier (FVClassifier). 3. The Classifier fetches all slices associated with the switch and launches a Slicer (FVSlicer) per module. * mappings of DPID to slices are found through configurations (the Flowmap) * modules associated with the control module (the primary module defining the behavior of a switch for that slice) may be grouped together in a slice. 4. Each Slicer sets up event dispatching for the modules associated with a slice. Event handling would (probably) look like the following. For switch-to-slice: