The Cisco Open SDN Controller is a commercial distribution of OpenDaylight that delivers business agility through automation of standards-based network infrastructure.
Built as a highly scalable software-defined networking (SDN) platform, the Open SDN Controller abstracts away the complexity of managing heterogeneous networks to improve service delivery and reduce operating costs.
The controller exposes REST APIs to allow other applications to take advantage capabilities of the controller and unlock the power of the underlying network infrastructure, and JAVA APIs to allow for the creation of new network services.
This session will present the basic constructs of the controller and the capabilities of the REST and JAVA APIs to demonstrate how the Open SDN Controller abstracts away the complexity of managing heterogeneous networks to improve service delivery and reduce operating costs.
4. The Cisco Open SDN Controller
• Based on OpenDaylight Helium
• Packaged as a Virtual Machine
• Key MD-SAL features pre-installed
• OpenFlow, NETCONF/YANG, BGP/PCEP, etc.
• Integrated User Interface
• Supports single-node and 3-node cluster
• Limited Availability Release as of April 30th , 2015
• See the /dev/innovate pod here in DevNet
A commercial distribution of the OpenDaylight SDN Controller
5. • Open platform for
network
programmability
• Enables SDN for
networks at any size
and scale
• New “Helium” release
delivers new user
interface and a much
simpler and
customizable
installation process
• Users can add value at
any layer (Apps,
Network Services, SB
Plugins)
OpenDaylight Controller
Cisco Contributions
6. “Just for the YANG of it”
• YANG is a data modeling language
• Documented in RFC6020
• Designed to model NETCONF data (see RFC6241)
• OpenDaylight’s MD-SAL is “Model Driven Service Abstraction Layer”
• “Model” == YANG Model
• OpenDaylight contains over 100 YANG models
• YANG is used as our IDL
• Southbound plugins described by YANG Models
• NETCONF plugin learns models from connected devices at run-time
Everything in MD-SAL is YANG modeled
7. RESTCONF
• REST protocol over HTTP
• For accessing data defined in YANG
• Container or List
• NOT leaf or leaf-list
• Using data stores defined in NETCONF
• YANG Modules are listed under
• /restconf/<Module> in top-level API
• Data classification based on the YANG config statement
• Request and response data can be in XML or JSON format. XML has structure
according to yang by XML-YANG and JSON by JSON-YANG
REST API Auto generated from the YANG Models
8. RESTCONF
• Two datastores are accessible:
• Config
• Data inserted by the Applications (REST Or Java)
• /restconf/config/<Module>/<Xpath to Container>
• Operational
• State of the network elements fetched from the network
• /restconf/operational/<Module>/<Xpath to Container>
REST API Auto generated from the YANG Models
9. RESTCONF URI
9
• It must start with <moduleName>:<nodeName> where <moduleName> is a
name of the YANG module and <nodeName> is the name of the top level node
in the module.
• Child nodes has to be specified in format:
• <nodeName> - can be used every time expect case when node with the same name
was added via augmentation from external YANG model (Concretely: Module A has
node A1 with child X. Module B augments node A1 by adding node X.)
• <moduleName>:<nodeName> - is valid every time
• <nodeName> has to be separated by /
• <nodeName> can represent a data node which is of list or container YANG
built-in type. If the data node is a list, there must be defined keys of the list
behind the data node name for example,
<nodeName>/<valueOfKey1>/<valueOfKey2>.
10. OSC API Authentication scheme
10
• OSC uses a Token based authentication scheme
• Issue the following request to get a token
• https://{{HOST}}/controller-
auth?grant_type=password&username={{user}}&password={{password}}&scope=sdn
• Response: {"expires_in":86400000,"token_type":"Bearer","access_token":"a304e0f0-ad68-3d93-
8986-cd775f3b9949"}
• Subsequent requests need the Basic Authorization Header of the form: "token:<token>”
• Here is a fragment of Javascript to automate the process
var data = JSON.parse(responseBody);
postman.setGlobalVariable("token", data.access_token);
var creds = btoa("token:" + data.access_token);
postman.setGlobalVariable("Authorization", "Basic " + creds);
11. Open SDN Controller YANG Models/APIs
• Inventory
• Topology
• Openflow
• Flow programming via Openflow Plugin RPC
• Flow programming via Config Inventory
• BGP
• PCEP
• Any Additional Plugins
• Mounted NETCONF Devices
REST API Auto generated from the YANG Models
16. This example provides the details to program a flow that
matches Ethernet packets with source MAC address
00:00:00:00:23:ae and destination MAC address
20:14:29:01:19:61 and sends them to port 2.
• Headers:
• Content-type: application/xml
• Accept: application/xml
• Authentication: admin:admin
• URL: http://<controller-
ip>:8181/restconf/config/opendaylight-
inventory:nodes/node/{node-id}/table/{table-id}/flow/{flow-
id}
• Example URL:
http://localhost:8181/restconf/config/opendaylight-
inventory:nodes/node/openflow:1/table/0/flow/1
• Method: PUT
L2 Flow Programming Sample
17. This example provides the details for programming a flow
that matches IP packets (ethertype 0x800) with the
destination address within the 10.0.10.0/24 subnet and
sends them to port 1.
• Headers:
• Content-type: application/xml
• Accept: application/xml
• Authentication: admin:admin
• URL: http://<controller-
ip>:8181/restconf/config/opendaylight-
inventory:nodes/node/{node-id}/table/{table-id}/flow/{flow-
id}
• Example URL:
http://localhost:8181/restconf/config/opendaylight-
inventory:nodes/node/openflow:1/table/0/flow/1
• Method: PUT
L3 Flow Programming Sample
18. REST APIs
18
RESTCONF APIs
For checking configuration
and operational states
List of exposed Northbound
APIs available via DevNet
and on platform
19. JAVA APIs
19
JAVA APIs
For network services
creation; event listening,
specifications and
forming patterns
SAL Binding, Common,
Connector and Core
APIs provided
List of exposed JAVA
APIs available via
DevNet
20. Java apps inside Cisco Open SDN Controller
• The controller creates Java APIs from YANG models at run-time
• YANG model maps to Java classes (class per container, list, typedef etc.)
• Java APIs designed for performance
• DTOs are immutable (write once/read many)
• APIs are asynchronous (no need to spawn a thread to wait for each data item)
• Apps packaged as Karaf features
• .kar files in the controller’s “deploy” directory will auto-install
21. The Tools
• A text editor, preferably an IDE like IntelliJ IDEA or Eclipse
• YANG – Modeling language (see RFC 6020)
• Java 1.7 – Programming language
• Maven >= 3.2.3 – Build tool
• OSGi – technology for building modular systems
• Karaf – technology for deploying and managing OSGi bundles
22. Apache Karaf Container
• Modular (Deploy only the
features/bundles you need)
• Hot Deployment
• Dynamic Configuration
• Powerful Extensible Shell
Console + Remote Access
• Native OS Integration
• Logging
• Security Framework
• Supports any Component
that can be wrapped as Jar
A:bun
dle
B:bun
dle
Y:bun
dle
X:bun
dle
C:bun
dle
f1 f2
comm
on
my-
features.xml
23. The Service Development Process
23
YANG Model (s)
Yang Tools
Generated API
Service
Implementation
Maven
Build Tools
Karaf Feature
Definition
Maven
Build Tools
Maven
Build Tools
1
2
3
OSGi API JAR
OSGi IMPL JAR Karaf KAR
4
Controller
5
• OSGi API JAR
• OSGI IMPL JAR
• Features.xml
Generate API
Deploy
25. SupportLearn / Build Validate Sell / Monetize
SDK on DevNet
• Getting Started Guides
• Reference Guides
• Code samples
• Videos
• Etc
Integration Points
• NB Rest APIs
• Network Service JAVA APIs
• OpenFlow 1.0 and 1.3
Interfaces
• NetConf / YANG Interface
• BGPLS Interface
• PCEP Interface
• OVSDB Interface
Community and Pay-As-
You Go Support
Developer Sandbox
Interop Validation Testing
• Application Specific Test Plans
• For Fee Testing
• Successful IVT completion allows
use of Cisco Compatible logo
Solution Partner Program
• Solution Marketplace listing
App Store (future)
• Streamlined sales and
delivery of 3rd party apps
(light-weight version of
Solutions Plus program)
Mandatory Coordinated
Customer Support
3rd Party Developer Enablement (DevNet Plan)
Cisco Open SDN Controller Developer Lifecycle
26. Devnet Portal for Cisco Open SDN Controller
developer.cisco.com/site/openSDN
Documentation
API Reference Guides
Video
Code samples
Sandbox environment
27. ODL/OSC Sessions in CLIVE 2015 San Diego
Session ID Session Name Location Session Lead
SD7 Open Flow Apps with Cisco Open SDN Controller World of Solutions
Vijay Kannan, Vasanth
Raghavan, Steven Carter,
Rao, Hema
LTRSDN-1913 Cisco Open SDN Controller Hands-on Lab
30B Upper Level: Wednesday, Jun 10, 1:00 PM -
5:00 PM
Salman Asadullah, Jeff
Teeter
DEVNET-1166 Open SDN Controller APIs
DevNet Classroom2 :Monday, Jun 8, 11:30 AM -
12:30 PM
Raghurama Bhat
DEVNET-2005
Using the Cisco Open SDN Controller RESTCONF
APIs
DevNet Classroom 1 Tuesday, Jun 9, 4:00 PM -
5:00 PM
Giles Heron
PCSSOL-1052 Software Defined Matrix Switching
Wednesday, Jun 10, 5:30 PM - 5:45 PM– Solution
Theater East
David Chandler - Practice
Manager Enterperise
Network Solutions, WWT
DEVNET-1164
Using OpenDaylight for Notification Driven
Workflows
DevNet Classroom 2: Thursday, Jun 11, 1:30 PM Andrew McLachlan
DEVNET-1175 OpenDaylight Service Function Chaining
Thursday, Jun 11, 1:30 PM - 2:00 PM– DevNet
Classroom 2
Paul Quinn
DEVNET-1152 OpenDaylight YANG Model Overview and Tools Tuesday, Jun 9, 9:00 AM - 10:00 AM Juraj, Giles, Bimal
DEVNET-1162
OPNFV – The Foundation for Running Your Virtual
Network Functions
DevNet Classroom 2: Thursday, Jun 11, 12:30 PM -
1:00 PM
Frank Brockners
DEVNET-2017 Service Chaining for SDN/NFV - State of the Stack
Devnet Theater: Tuesday, Jun 9, 4:00 PM - 4:30
PM
Uri Elzur, Intel Corp
DEVNET-1153
Enterprise Application to Infrastructure Integration
– SDN Apps
Monday, Jun 8, 2:30 PM - 3:00 PM Vasanth Raghavan
TECMPL-3200 SDN WAN Orchestration Principles and Solution 15B Mezz: Sunday, Jun 7, 1:00 PM - 5:00 PM Chris Metz, Josh Peters
PSOSDN-2005 Group Based Policy: Consistent Network Policy
23C Upper Level: Thursday, Jun 11, 1:00 PM -
2:00 PM
Sanjay Agarwal
BRKSDN-2761
OpenDaylight: The Open Source SDN Controller
Platform 16B Mezz: Monday, Jun 8, 10:00 AM - 12:00 PM
Ed Warnecke
DEVNET-1006 Getting Started with OpenDayLight
DevNet Classroom 1:Wednesday, Jun 10, 2:30 PM
- 3:30 PM
Giles Heron, Charles Eckel
DEVNET-1174 OpenDaylight Apps Development Panel
DevNet Theater:Monday, Jun 8, 12:00 PM - 1:00
PM
Giles, Chris, Niklas, Bimal,
Juraj
TECNMS-2009 - NETCONF/YANG Modeling 17AB Mezz: Sunday, Jun 7, 8:00 AM - 12:00 PMT Mike, Giles, Jan, Juraj