Abstract
If simplicity is a key strategy for success as a network protocol, OpenFlow is not winning. At its core, OpenFlow presents a simple idea: a network switch data plane abstraction along with a control protocol for manipulating that abstraction. The result has been far from simple, with new versions released annually, complex feature dependencies, and unstable version negotiation. This complexity represents a roadblock for engineers. We have distilled the core abstractions present in five existing versions of OpenFlow and refactored them into a simple API called tinyNBI. The goal of tinyNBI is to allow configuration of all existing OpenFlow abstractions without having to deal with the unique personalities of each version or their level of support in target switches.
The Problem: OpenFlow Version Fragmentation
OpenFlow was originally pitched as a simple way to control network switches, but it has evolved into a fragmented ecosystem. With five active versions (1.0 to 1.4) and a new release nearly every year, developers face significant challenges.
As illustrated in Figure 1, the number of features—particularly optional ones—has exploded over time. This "optionality" means that an application written for a specific version might fail on a switch that claims support for that version but lacks specific optional instructions. Currently, programmers must manually handle version negotiation and capability checks, leading to brittle "spaghetti code" filled with complex branching logic to support diverse hardware.
The tinyNBI Solution
tinyNBI is a minimal, version-agnostic Northbound Interface (NBI) designed to rescue SDN developers from this complexity. It sits between the controller and the application, providing a stable C API that distills core primitives into a unified data model.
Unified Data Model
The authors analyzed five versions of OpenFlow to identify essential abstractions such as Flow Tables, Matches, Instructions, Actions, Meters, and Groups. As shown in Figure 3, tinyNBI organizes these into a coherent graph that explicitly separates the Minimal Control Plane (connections, switches) from the Data Plane (datapaths, ports, flows). This separation makes the code more logical and easier to debug.
Key Architectural Choices
- Requirement Declaration: Unlike standard OpenFlow, tinyNBI requires applications to declare their needs upfront (e.g., "I need two flow tables"). If the switch cannot meet these requirements, the application fails gracefully at startup rather than failing unpredictably during runtime.
- Abstraction Handling: For missing hardware features, tinyNBI provides three paths: seamless emulation using equivalent operations, switch offloading to the controller, or explicit error indication.
- The Selector Pattern: The API uses a stable procedural interface with "selectors" (e.g.,
ofp_get(OFP_PORT, ...)). This ensures that adding new features to the library does not break binary compatibility for older applications. - Resource Management (RAII): Borrowing from C++, tinyNBI treats network resources like flow tables as finite objects that must be explicitly acquired and released, reducing the risk of resource leaks.
Results and Future Work
tinyNBI has been successfully integrated into the "nocontrol" controller, demonstrating its utility in a real-world SDN stack. It allows for building complex multi-stage flow instructions with significantly less boilerplate than raw OpenFlow. While tinyNBI focuses on low-level primitives, it provides the stable foundation necessary to build higher-level abstractions like VPN maps or load balancers without worrying about the underlying protocol version.
Summary updated