Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Opendaylight SDN Controller


Published on

Opendaylight is a project which promotes the Software Defined Networking.

Officially started on April -8th-2013.

The linux foundation planned an pivotal role in it, but it’s a consortium and multiple tech companies are partnered to led the SDN.

Its based on Eclipse Public License – v 1.0 (EPL).
Software defined networking is a research area which let a network to program, It also output network control applications, and those applications are to control the network

Example :

A network formed by the openflow enabled switch.

Controller Platform provides the OPEN APIs to program the network.

Controller Applications control the network based on the needs

Published in: Technology

Opendaylight SDN Controller

  1. 1. OpenDayLight SDN Controller ________________________________________________________________________ SUMIT ARORA Last updated : 11th-Nov-2014
  2. 2. Limit of Liability/Disclaimer of Warranty: Overall explanation presented on this ppts ,are based on my views, my learning, and my language it may differ from your understanding, as my learning curve still rolling. The author makes no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaims all warranties, including without limitation warranties of fitness for a particular purpose. The fact that an organization or web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author endorses the information the organization or web site may provide or the recommendations it may make. Furthermore, readers should be aware that Internet web sites listed in this work may have changed or disappeared between when this work was written and when it is read. So feel free write me your comments to make this better if any :
  3. 3. OPENDAYLIGHT Opendaylight is a project which promotes the Software Defined Networking. Officially started on April -8th-2013. The linux foundation planned an pivotal role in it, but it’s a consortium and multiple tech companies are partnered to led the SDN. Its based on Eclipse Public License – v 1.0 (EPL).
  4. 4. SOFTWARE DEFINED NETWORKING Software defined networking is a research area which let a network to program, It also output network control applications, and those applications are to control the network Example : •A network formed by the openflow enabled switch. •Controller Platform provides the OPEN APIs to program the network. •Controller Applications control the network based on the needs N e t w o r k Controller Applications
  5. 5. Basic HandsOn ________________________________________________________________________ OpenDayLight Controller
  6. 6. SET THE ENVIRONMENT – Step-1 Step-1 Set the Environment •Install Virtual Box •Install Ubuntu •Install Eclipse IDE •Install Maven •Install Graphical Visualization for dependency modules •Install Mininet •Wireshark OF Plugin to Capture OF Packets Virtual Box Mininet
  7. 7. Controller Code – Step-2 Controller Code •Download the Code •Compile the code via mvn clean install •Import the project to eclipse •Launch the project 1 2 3 4 Step-2
  8. 8. Mininet – Step-3 Mininet •Start mininet •Create a network e.g. sudo mn -- controller=remote,ip= -- topo single SSH to mininet – Created one network mininet Step-3
  9. 9. Controller’s Web UI-Step-4 Step-4 Start the webUI controller’s UI : e.g. http://X.X.X.X:8080/
  10. 10. Controller’s Web UI-step-4 • WebUI shows one network element • Add the Gateway Address *Please refer “Explore as a developer section” for Gateway IP Configuration on ODL’s Web UI
  11. 11. Controller’s Web UI-Step-4 •Perform Ping on mininet network •See the network graph on UI •The learnt path appears based on the ping performed. •CREATE VARIOUS NETWORK ON MININET •BREAKPOINTS ON ECLIPSE •TRACE Open Flow PACKETS ON WIRESHARK
  12. 12. How to get the Support ? You may face installation Issue You may face compilation Issue You may face eclipse related Issue e.g. sudo maven clean install may show OutOfMemory Error Possible Solution : [1] . Run sudo maven clean install – DskipTests (It will skip the tests to done) [2]. Check the VM’s memory size (it should be minimum 2.5 GB If so : Refer the last page references / See the installation/opendaylight videos on youtube.
  13. 13. How to get the Support ?- Mailing Lists [Also recommended] Subscribe to these for discussion/development:
  14. 14. IRC – Internet Relay Chat for opendaylight controller Open this link : 1 2 3
  15. 15. Questions – OpendayLight Q&A Forum Open this link :
  16. 16. Refer following links for the latest installation updates…,_Hacking,_and_Pu shing_the_Code_from_the_CLI tallation
  17. 17. Latest Helium Release UI Screenshots…
  18. 18. Latest Helium Release UI Screenshots…
  19. 19. Latest Helium Dlux UI Screenshots…
  20. 20. Latest Helium Dlux UI Screenshots…
  21. 21. Latest Helium Dlux UI Screenshots…
  22. 22. For Latest Simultaneous Release: Helium Release Plan
  23. 23. Explore it as a Developer ________________________________________________________________________ OpenDayLight Controller
  24. 24. LOGICAL ARCHITECTURE Open Daylight Controller is a JVM so it can run on any metal and OS provided •JVM 1.7+ •Linux (Ubuntu or RHEL or Fedora or Any other popular Linux Distro that supports Java) ODL Controller
  25. 25. Software Tools/Paradigms OpenDayLight uses the following software tools/paradigms. It is important to become familiar with them: •Maven: OpenDayLight uses Maven for easier build automation. Maven uses pom.xml (Project Object Model for this bundle) to script the dependencies between bundles and also to describe what bundles to load on start. •OSGi: This framework in the backend of OpenDayLight allows dynamically loading bundles and packaged Jar files, and binding bundles together for information exchange. •Java interfaces: Java Interfaces are used for event listening, specifications and forming patterns. This is the main way in which specific bundles implement call-back functions for events and also to indicate awareness of specific state. •REST APIs : are north bound APIs e.g. Topology,Host Tracker,Flow Programmer,Static Routing ,Statistics, Subnets ,Switch Manager
  26. 26. OSGI Bundles Bundle (Application) Hardware Bundle Bundle Bundle Operating System OSGi Java VM Driver Driver Driver = service interface exported and imported by bundles The system(ODL-SDNC) is made of modules that express interest in services and expose services. An OSGi application has no top and no bottom—it is simply a collection of bundles. There is also no main program; some bundles contribute code libraries; others start threads, communicate over the network, access databases, or collaborate with still others to gain access to hardware devices and system resources. While there are often dependencies between bundles, in many cases bundles are peers in a collaborative system. Bundle A {} = service, java interface Bundle B {} Bundle C {}
  27. 27. OpenDayLight Controller’s Bundles The lifecycle of the bundle starts from the <Bundle-Activator> The main function of the activator is two fold 1) To start/stop the execution 2) To control the lifecycle of the objects that will implement the business logic The Import- Packages/Export-Packages are dependencies for the bundles, from the classpath point of view. In OSGi each bundle has it's own classpath,and the Import/Export,decide how the classpath will be constructed
  28. 28. OpenDayLight Controller’s Developer Dive Mutil-Tenant is supported via the concept of Container •Container –A Self Sufficient functional entity, It identified by the Unique Name •Multiple containers are possible •Each of this Container can have Topology Managers, ARP Handler, Host Tracker , Form its own Topology and run its own topology Algorithm for its domain. •Each of the domain can choose to control the entire network or part of the network or certain application in the network subnet •Each module ( or bundles) can be configured to Participate in any of the containers. •Each of the container can have its own administrative and management access •By default : when the controller comes , each service in the controller such as topology. ARP,Host –Tracker etc all belong to default container. •Currently every module express its interest for “default” container in order to make the base controller to work
  29. 29. OpenDayLight Controller’s Developer Dive GRAPHICAL VISUALIZATION FOR DEPENDENCY MODULES Step 1 : Just install this plugin via "Install New Software ..." by adding site - Step 2 : Restart Eclipse Step 3 : Navigate to "Window --> Show View --> Other .. --> Plug-in Development --> Graph Plug-in Dependencies" - this opens the "Plug-in Dependency Analysis" pane at the bottom Step 4 : Right-click on the pane and select "Focus On", this opens "Plug-in Selection" dialog. Type the plugin to choose - eg. “topolgymanager", select the plugin from the list and .. ... you get a nice dependency view of the “topologymanager" plugin !!
  30. 30. OpenDayLight Controller’s Developer Dive How to start the inspection ? There is no hard-coded entry point. The most important methods are getImplementations/configureInstance and getGlobalImplementation/configureGlobalInstance. Example -1 : Each bundle can decide what to implement. Looking at the ARPHandler module. There is getImplementations. It returns an Object[] with ArpHandler.class that tells the business logic is implemented by the ArpHandler class when instantiated.[A bundle can have many objects implementing the business logic.] Example-2 : protocol_plugins.openflow package org.opendaylight.controller.protocol_plugin.openflow.internal; public Object[] getImplementations() { Object[] res = { TopologyServices.class, DataPacketServices.class, InventoryService.class, ReadService.class, FlowProgrammerNotifier.class }; return res;
  31. 31. OpenDayLight Controller’s Developer Dive How to start the inspection ? package org.opendaylight.controller.arphandler.internal; [1] .On configuring the ArpHandler object: [2].ArpHandler will publish the services listed in the c.setInterface. [3].While it will consume the services provided by others and listed in the c.add(createServiceDependency This is how a business logic object provides and consume services All the black magic underneath that power this mechanism, is provided by the Apache Felix Dependency Manager 3 1 2
  32. 32. OpenDayLight Controller’s Developer Dive Services [ Example] The SAL provides basic services like Device Discovery which are used by modules like Topology Manager to build the topology and device capabilities. Topology Service is a set of services that allow to convey topology information like a new node a new link has been discovered and so on. Discovery Service The interface provides the methods to notify the listener when an edge is added/deleted/changed. Flow Programming service provide , installing/modifying/removing flows on a network node.
  33. 33. OpenDayLight Controller’s Developer Dive Gateway IP Configuration on ODL’s Web UI •The Gateway IP configuration is purely meant to provide a way for the Controller to aid the ARP handler to do Proxy ARP functionality. •It would need Subnet Gateway IP Configuration in the controller for all the Subnets being assisted by the controller. •The Subnet gateway IP configuration is generic in nature and can be used for other purposes
  34. 34. OpenDayLight Controller’s Developer Dive PacketIn Message The packetIN is an openflow specific function so it's handled by the openflow protocol plugin. once a network element deliver a packetIN to the controller the openflow protocol plugin[org.opendaylight.controller.protocol_plugin.openflow] will get it and transform in RawDataPacket then dispatch via SAL(Service Abstraction Layer) data packet services Serial: When a Data Packet Listener gets a packet after another, this case is necessary when the subsequent handler needs some extra information that can only be provided by another Data Packet Service Handler. props.put("salListenerDependency", "loadbalancer"); props.put("salListenerName", “arphandler"); [ARPHandler would get the packet only after loadbalancer] Parallel : When a Data Packet Listener doesn't express any dependency then it will get a copy of the packet as anybody else. [IListenDataPacket]
  35. 35. OpenDayLight Controller’s Developer Dive [1]. Say the OpenFlow plugin receives an ARP packet that need to be dispatched to the ARP Handler Application [2]. The OpenFlow Plugin will call IPluginOutDataPacketService to get the packet to the SAL. [3]. The ARP Handler Application would’ve registered to the IListenDataPacket Service. The SAL upon receiving the packet (in #2 above) will thus handover the packet to the ARP Handler App. [4]. The Application can now process the packet. [1].The Application constructs the packet and calls the interface IDataPacketService provided by SAL to send the packet. The Destination network device is to be provided as part of the API. [2].SAL will then call the IPluginInDataPacketService interface for a given Protocol plugin based on the destination network device (OpenFlow Plugin in this case) [3].The Protocol plugin will then ship the packet to the appropriate network element. The plugin will handle all protocol specific processing. Data Packet Service
  36. 36. OpenDayLight Controller’s Developer Dive When a module tries to install a flow rule to some switch, how the rule is processed. (When multiple modules independently install flow rules to switches, it will inevitably conflict with other rules) The logic is pretty simple at the moment, if someone tries to install an entry and there is a previous one covering the same match, a conflict is raised •There are various interfaces provided by the forward rule manager e.g. asynchronous ,synchronous. Those interfaces send the message via org.opendaylight.controller.protocol_plugin.openflow.core; to the switch. •Forward rule manager maintains the openflow-switch’s rules database in ruledb data structure. •For the installation of a rule, based on the given parameters (e.g. switch id, match parameters, action) It first verify the conflict on its ruleDB, If that return success, then it forward this rule as flow-mod packet to install the rule on a specific switch.
  37. 37. OSGI Commands… osgi> b 77 org.opendaylight.controller.networkutils.implementation_0.4.3.SNAPSHOT [77] Id=77, Status=ACTIVE Data Root=E:odlheliumcontrolleropendaylightdistributionopendaylighttargetdistribution.opendaylight-osgipackage opendaylightconfigurationorg.eclipse.osgibundles77data "Registered Services" {org.opendaylight.controller.sal.core.IContainerAware}={} Services in use: {org.osgi.service.log.LogService, org.eclipse.equinox.log.ExtendedLogService}={} No exported packages Imported packages org.opendaylight.controller.sal.core; version="0.8.2.SNAPSHOT"<org.opendaylight.controller.sal_0.8.2.SNAPSHOT [82]> org.slf4j; version="1.7.2"<slf4j.api_1.7.2 [7]>; version="3.0.1"<org.apache.commons.net_3.0.1 [119]> org.opendaylight.controller.networkutils; version="0.4.3.SNAPSHOT"<org.opendaylight.controller.networkutils_0.4.3.SNAPSHOT [161]>; version="3.0.0"<org.apache.felix.dependencymanager_3.1.0 [32]> org.opendaylight.controller.sal.connection; version="0.1.3.SNAPSHOT"<org.opendaylight.controller.sal.connection_0.1.3.SNAPSHOT [143]>; version="3.0.1"<org.apache.commons.net_3.0.1 [119]> org.opendaylight.controller.connectionmanager; version="0.1.3.SNAPSHOT"<org.opendaylight.controller.connectionmanager_0.1.3.SNAPSHOT [64]> org.opendaylight.controller.sal.inventory; version="0.8.2.SNAPSHOT"<org.opendaylight.controller.sal_0.8.2.SNAPSHOT [82]>; version="0.5.2.SNAPSHOT"<org.opendaylight.controller.clustering.services_0.5.2.SNAPSHOT [16]> org.opendaylight.controller.sal.flowprogrammer; version="0.8.2.SNAPSHOT"<org.opendaylight.controller.sal_0.8.2.SNAPSHOT [82]> org.opendaylight.controller.sal.reader; version="0.8.2.SNAPSHOT"<org.opendaylight.controller.sal_0.8.2.SNAPSHOT [82]> org.opendaylight.controller.forwardingrulesmanager; version="0.6.1.SNAPSHOT"<org.opendaylight.controller.forwardingrulesmanager_0.6.1.SNAPSHOT [139]> org.opendaylight.controller.switchmanager; version="0.7.2.SNAPSHOT"<org.opendaylight.controller.switchmanager_0.7.2.SNAPSHOT [145]> org.opendaylight.controller.sal.match; version="0.8.2.SNAPSHOT"<org.opendaylight.controller.sal_0.8.2.SNAPSHOT [82]> org.opendaylight.controller.sal.utils; version="0.8.2.SNAPSHOT"<org.opendaylight.controller.sal_0.8.2.SNAPSHOT [82]> No fragment bundles Named class space org.opendaylight.controller.networkutils.implementation; bundle-version="0.4.3.SNAPSHOT"[provided] No required bundles
  38. 38. Creating a New Module ________________________________________________________________________ OpenDayLight Controller
  39. 39. Creating A New Module Open this link :
  40. 40. Creating A New Module •Perform the steps as specified in the tutorial •do sudo mvn clean install -DskipTests •It will generate ../target/L2Forwarding-0.4.0- SNAPSHOT.jar
  41. 41. Creating A New Module •Run the opendaylight controller in Debug Mode
  42. 42. Creating A New Module •Install the generated JAR file
  43. 43. Creating A New Module •Insert the break points •Perform ping from mininet •Trace the code
  44. 44. Explore It As A Researcher ________________________________________________________________________ OpenDayLight Controller
  45. 45. Explore it as a researcher  You may research what can be achieved by replacing the traditional network with openflow based network and opendaylight SDN controller.  You may research the bottlenecks/assistance of openflow based network with opendaylight sdn controller e.g. rule conflicts while installing the rules in dynamic situation (see this : and listen to Jennifer Rexford: ) .  You may design set of use cases and prove that on these situation openflow based network with opendaylight SDN controller perform better than the traditional network.]  You may introduce any additional methodology e.g. System and methods for xyz….with SDN e.g Optimizing the 'One Big Switch' abstraction in Software Defined Networks. HotSwap: Correct and efficient controller upgrades for Software-Defined Networks.
  46. 46. Explore It As A Business ________________________________________________________________________ OpenDayLight Controller
  47. 47. Explore it as a business • You may pick up a design pattern of data center based network e.g. either self experienced or detailed discussion with relevant candidates of Data Center Network (Network Admins, Network Designers, Network Maintainers) • You may design the technicalities with existing network situations. • You may then shape an opendaylight SDN controller/openflow based product, which can solve some business problems e.g. managing the network by controller reduces 50% of operational cost and increases the maintenance or administration flexibility e.g. view
  48. 48. Explore It As A Employee ________________________________________________________________________ OpenDayLight Controller
  49. 49. Explore it as a business • If you are an employee of a company and you have been given some work related to SDN, continue to do the assigned work item, If your interest increases then you are free bird to do anything. • And if you are newbie with opendaylight sdn controller, then here are the steps which will be as a jump start : daylight-sdn-controller-for-newbies/
  50. 50. Explore It As Your Interest ________________________________________________________________________ OpenDayLight Controller
  51. 51. Explore it as a interest • If you are a die-hard network enthusiasts and truly want to explore the practical internals of the network.
  52. 52. Explore it as a interest • You may contribute to opendaylight, you may design a new user interface for a home based router, you may create an integrated controller for your campus network, you are free bird…
  53. 53. So enjoy with SDN, once again, according to my experience the SDN abstractly means Software Defined Networking. Means A Software can define the network or A Software can control network but which Software and which network, you have to explore.
  54. 54. REFERENCES channel : #opendaylight's_Modules/Bundles_and_Interfaces,_Hacking,_and_Pushing_the_Code_from_the_CLI ws/opendaylight/northbound/topology/target/site/wsdocs/resource_TopologyNorthboundJAXRS.html
  55. 55. Still evolving… Last Updated : 11th-November-2014