OVSDB Integration - Design - OpenDaylight Project
OVSDB Integration - Design - OpenDaylight Project
Page
Page
Discussion
View source
History
Tools
Page information
Permanent link
Printable version
Special pages
Related changes
Search Search
Log in
OpenDaylight.org
Get Software
Documentation
User Stories
Community
Blog
Q&A Form
Wiki
OVSDB Integration:Design
Contents
1 OVSDB Quick Resources
2 OpenDaylight OVSDB SouthBound Plugin Architecture and Design
3 Bird's eye view of OpenDaylight Controller Architecture
4 OVSDB Southbound plugin
4.1 Connection Service
4.2 Network Configuration Service
4.3 Bidirectional JSONRPC Library
4.4 OVSDB Schema definitions and Object mappers
4.4.1 End to End Examples
4.5 Overlay Tunnel Management
4.6 OVSDB to OpenFlow plugin mapping service
4.7 Inventory Service
5 What next
See the OVSDB YouTube Channel for getting started videos and other tutorials:
https://wiki.opendaylight.org/view/OVSDB_Integration:Design 1/6
5/17/2017 OVSDB Integration:Design OpenDaylight Project
In the SDN space, controllers and applications can interact with the OpenVSwitch by means of two different channels : OpenFlow and OVSDB.
While the protocol OpenFlow addresses the forwardingside of the OVS functionality, OVSDB addresses the managementplane.
A simple and concise overview of OVSDB can be found at http://networkstatic.net/gettingstartedovsdb/ (Thanks to Brent's tireless efforts).
This document covers the architecture and design of OVSDB plugin in the OpenDaylight project.
1. Network Service Functional Modules (such as Topology Manager, Inventory Manager, Forwarding Rules Manager,...)
2. NorthBound API Modules (such as Topology APIs, Bridge Domain APIs, Neutron APIs, Connection Manager APIs, ...)
3. Service Abstraction Layer(SAL) (Inventory Services, DataPath Services, Topology Services, Network Config,...)
4. SouthBound Plugins (OpenFlow Plugin, OVSDB Plugin, OpenDove Plugin,...)
5. Application Modules (Simple Forwarding, Load Balancer)
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐+
| Connection |Network Config| Neutron |
| Service APIs| APIs | APIs |
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐+
| NorthBound API Layer (REST) |
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
| +‐‐‐‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ |
| |Connection | |Topology | | Switch | |
| | Manager | | Manager | | Manager | |
| +‐‐‐‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ |
| Network Service Functions Layer |
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
| +‐‐‐‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ |
| |Connection | |Data Pkt | |Inventory| |
| | Service | | Service | | Service | |
| +‐‐‐‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐+ |
| Service Abstraction Layer (SAL) |
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
| SouthBound API Layer |
| +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ |
| | OpenFlow Plugin| | OVSDB Plugin | |
| | +‐‐‐‐‐‐‐‐‐‐‐‐+ | | +‐‐‐‐‐‐‐‐‐‐‐‐+ | |
| | | Flow Prog | | | | Connection | | |
| | | Service | | | | Service | | |
| | +‐‐‐‐‐‐‐‐‐‐‐‐+ | | +‐‐‐‐‐‐‐‐‐‐‐‐+ | |
| | +‐‐‐‐‐‐‐‐‐‐‐‐+ | | +‐‐‐‐‐‐‐‐‐‐‐‐+ | |
| | | Data Pkt | | | | Net Config | | |
| | | Service | | | | Service | | |
| | +‐‐‐‐‐.‐‐‐‐‐‐+ | | +‐‐‐‐‐.‐‐‐‐‐‐+ | |
| | . | | . | |
| +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ +‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ |
+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+
Each layer of the Controller architecture performs specified tasks and hence aids in modularity.
While the Northbound API layer addresses all the RESTBased application needs, the SAL layer takes care of abstracting the SouthBound plugin
Protocol Specifics from the Network Service Functions.
Each of the SouthBound Plugins serves a different purpose, with some overlapping.
For example, the OpenFlow plugin might serve the DataPlane needs of an OVS element while the OVSDB plugin can serve the management plane
needs of the same OVS element.
As the Openflow Plugin talks OpenFlow protocol with the OVS element, the OVSDB plugin will use OVSDB schema over JSONRPC transport.
The rest of the document will cover the OVSDB SouthBound plugin design and architecture.
[RFC 7047] and the [Schema] definitions (http://openvswitch.org/ovsvswitchd.conf.db.5.pdf) gives all the theoretical info one would expect to know
with regards to OVSDB. [RFC 7047] is sufficiently generic in that it lays the ground work on the Wire Protocol and Database Operations, and the
[Schema] covers (currently) 13 OVS tables With an eye for future schema expansion for OVS and by other vendors on proprietary implementations.
True to its name, it is a Database records Transport protocol using JSON RPC1.0. The authors of these 2 documents have done proper justice to this
subject.
But, you are up for a rollercoaster ride when you try it hands on. Take a peek @ a "transact" message and you will know what I mean :)
It is nothing like your traditional Protocols that networking engineers are used to. Again, http://networkstatic.net/gettingstartedovsdb/ gives a more
practical look at the protocol structure.
https://wiki.opendaylight.org/view/OVSDB_Integration:Design 2/6
5/17/2017 OVSDB Integration:Design OpenDaylight Project
The OpenDaylight OVSDB southbound plugin consists of one or more OSGi bundles addressing the following services or functionalities :
Connection Service
One of the primary services that most southbound plugins provide to SAL in OpenDaylight and NSF is Connection Service. The service provides
protocol specific connectivity to network elements, and supports the connectivity management services as specified by the OpenDaylight Connection
Manager. This includes :
1. Connection to a specified element given IPaddress, L4port, and other connectivity options (such as authentication,...)
2. Disconnection from an element
3. Handling Cluster Mode change notifications to support the OpenDaylight Clustering/HighAvailability feature
By default, the ovsdbserver process running on the hypervisor listens on TCP port 6632 (this is configurable). The Connection Service takes in the
connectivity parameters from the connection manager including the IPaddress and TCPPort for connections. Owing to the many benefits it provides,
Connection Service will use the Netty framework (http://netty.io/) for connectivity purposes.
Every successful connection to a network element will result in a Node object (Refer to OpenDaylight SAL Node.java) with the type = "OVSDB" and
value = UserReadable Name of the Connection as specified by the Connection Manager. This Node object is returned to the OpenDaylight Connection
Manager and the application that invoked the Connect() functionality.
And any subsequent interaction with this network element through any of the SAL services (Connection, Configuration, ...) will be via this Node
Object. This Node object will be added to the Inventory maintained and managed by the Plugin's Inventory Service (Section 3.7) The Node object will
also assist with the OVSDB to Openflow mapping (Section 3.6).
And of course, the Node and its "Name" holds the key to the stateful Netty Socket handler maintained under the Connection Object created during the
connect() call. It needs a special mention about the Netty framework's Channel concept, which provides the much needed abstraction on the pipelining.
With this Channel Pipelining and the asynchronous event handling, the message handling process gets much more streamlined and well understood.
Also, makes it easier to replace or manipulate the pipeline functions in a more controlled fashion. More on this in later sections.
The goal of OpenDaylight's Network Configuration umbrella of Services is to provide complete Management Plane solutions needed in order to
successfully install, configure and deploy various SDN based Network Services. These are generic services which can be implemented in part or full by
any SouthBound Protocol Plugin. The SouthBound plugins can be those new network virtualization protocol plugins such as OVSDB JSONRPC or
Traditional management protocols such as SNMP or any others in the middle.
The above definition and more information on Network Configuration Services are available at :
https://wiki.opendaylight.org/view/OpenDaylight_Controller:NetworkConfigurationServices
The current default OVSDB Schema's support the Layer2 Bridge Domain services as defined in the Networkconfig.bridgedomain component.
https://wiki.opendaylight.org/view/OVSDB_Integration:Design 3/6
5/17/2017 OVSDB Integration:Design OpenDaylight Project
1. Create Bridge Domain : createBridgeDomain(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params)
2. Delete Bridge Domain : deleteBridgeDomain(Node node, String bridgeIdentifier)
3. Add configurations to a Bridge Domain : addBridgeDomainConfig(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params)
4. Delete Bridge Domain Configuration : removeBridgeDomainConfig(Node node, String bridgeIdentifier, Map<ConfigConstants, Object> params)
5. Associate a port to a Bridge Domain : addPort(Node node, String bridgeIdentifier, String portIdentifier, Map<ConfigConstants, Object> params);
6. Disassociate a port from a Bridge Domain : deletePort(Node node, String bridgeIdentifier, String portIdentifier)
7. Add configurations to a Node Connector / Port : addPortConfig(Node node, String bridgeIdentifier, String portIdentifier, Map<ConfigConstants,
Object> params)
8. Remove configurations from a Node Connector : removePortConfig(Node node, String bridgeIdentifier, String portIdentifier,
Map<ConfigConstants, Object> params)
The above services are defined as generalized entities in SAL in order to ensure it fits with all relevant SouthBound Plugins equally. Hence the OVSDB
plugin must derive appropriate specific configurations from a generalized request. For example : addPort() or addPortConfig() SAL service call above
takes in a params option which is a Map structure with a Constant Key. These ConfigConstants are defined in SAL networkconfiguration service :
These are mapped to the appropriate OVSDB configurations. So, if the request is to create a VXLAN tunnel with srcip=x.x.x.x, dstip=y.y.y.y, then the
params Map structure may contain :
{
TYPE = "tunnel",
TUNNEL_TYPE = "vxlan",
SOURCE_IP="x.x.x.x",
DEST_IP="y.y.y.y"
}
The above params definition is just an example and this will be expanding based on various supported northbound APIs and the Network Service
Functions supported in the OpenDaylight Controller platform.
Please note that all of the APIs take in the Node parameter which is the Node value returned by the connect() method explained in Connection Service
in Section 3.1.
Please refer to these EndtoEnd examples to understand the Configuration Service and its operational relationship with other OVSDB
Components
After various attempts with existing and available jsonrpc libraries, the OpenDaylight OVSDB project decided to design and implement a Bidirectional
JSONRPC library (mainly due to the various limitations in the existing opensource alternatives). Due to the nature of the library, it is very easy to
design it as a module that manages the Netty connection towards the Element. But, it is much more benefitial to maintain the Netty connection and
Channel management at the Connection Service and let the JSONRPC library be part of the Channel as instantiated by the Connection Service. This
provides the ability for connection Service to keep control of the pipeline and perform various OVSDB wireprotocol operations effectively.
This library will abstract all the wireprotocol headaches such as application level fragmentation and reassembly, Encoding formats, and others, and
provides simple and clean objects for others in the pipeline to work on.
At the time of this writing, we have a better understanding on the demarshaling piece of the puzzle. Our understanding on the marshaling is still
evolving and this section will be updated based on the research.
Please refer to these EndtoEnd examples to understand the operational relationships with other OVSDB Components
OVSDB Schema definitions and Object Mapping layer sits right above the JSONRPC library which will map between the generic JSON objects to
OVSDB schema POJOs (Plain Old Java Object) and viceversa. There is a value in providing this abstraction rather than having the POJO object
mapping done on the JSONRPC library. This helps in evolving independently. This layer mostly provides the Java Object definition for the
corresponding OVSDB schema (13 of them) & also will provide much more friendly API abstractions on top of these object data. This helps in hiding
the JSON semantics from the functional modules such as Configuration Service and Tunnel management.
On the demarshaling side of things, the mapping logic differentiates the Request & Response messages as follows :
https://wiki.opendaylight.org/view/OVSDB_Integration:Design 4/6
5/17/2017 OVSDB Integration:Design OpenDaylight Project
It is worth to note here that the JSON semantics of these OVSDB schema is quite complex and IMHO unnecessarily convoluted (though we appreciate
the intention of keeping it as generic as possible).
The following figures summarizes a couple of endtoend scenarios :
Network Virtualization using OVS is achieved through Overlay Tunnels. The actual Type of the Tunnel (GRE, VXLAN, STT) is of a different topic.
The differences between these Tunnel Types are mostly on the Encapsulation and differences in the configuration. But can be treated uniformly for the
sake of this document. While Establishing a Tunnel using configuration service is a simple task of sending OVSDB messages towards the ovsdbserver,
https://wiki.opendaylight.org/view/OVSDB_Integration:Design 5/6
5/17/2017 OVSDB Integration:Design OpenDaylight Project
the scaling issues that would arise on the state management at the dataplane (using OpenFlow) can get challenging. Also, this module can assist in
various optimizations in the presence of Gateways & also helps in providing Service guarantees for the VMs using these Overlays with the help of
underlay orchestration.
This is an evolving topic and more information will be added once the usecases are nailed down.
As explored in Section 3.1, the ConnectionService's connect() would result in a Node that represents a ovsdbserver. The CreateBridgeDomain()
Configuration on the above Node (as defined in Section 3.2) would result in creating a OVS bridge. This OVS Bridge is an OpenFlow Agent for
OpenDaylight's OpenFlow plugin with its own Node represented as (example) OF|xxxx.yyyy.zzzz.
Without any help from the OVSDB plugin, the Controller platform's Node Mapping Service would not be able to map the
Without such mapping, it wouuld be extremely difficult or very artificial for the applications to manage and maintain such nodes. This Mapping Service
provided by OVSDB plugin would essentially help in providing much more value added services to the orchestration layers that sit on top of the
Northbound APIs (such as OpenStack).
Inventory Service
Inventory Service provides a simple database of all the Nodes managed and maintained by the OVSDB plugin on a given Controller. For optimization
purposes, it can also provide enhanced services to the OVSDB to OpenFlow mapping service by maintaining the
What next
Again, stating the obvious, this is just a start and will act as a platform for a rich opensource based Network Virtualization services using OVS and
other OpenDaylight projects.
https://wiki.opendaylight.org/view/OVSDB_Integration:Design 6/6