%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2C3E50', 'primaryTextColor': '#fff', 'primaryBorderColor': '#16A085', 'lineColor': '#16A085', 'secondaryColor': '#E67E22', 'tertiaryColor': '#7F8C8D'}}}%%
flowchart LR
subgraph Overview["SDN Controller Basics"]
START([This Page<br/>Overview & Navigation])
end
subgraph Chapters["Focused Chapters"]
CH1[SDN Controller<br/>Architecture]
CH2[SDN Controller<br/>Comparison]
CH3[SDN APIs &<br/>High Availability]
end
START --> CH1
START --> CH2
START --> CH3
CH1 -->|"15 min"| T1["Internal Components<br/>Message Flow<br/>Reactive vs Proactive"]
CH2 -->|"18 min"| T2["OpenDaylight<br/>ONOS<br/>Ryu<br/>Floodlight"]
CH3 -->|"25 min"| T3["Northbound APIs<br/>Southbound APIs<br/>Clustering<br/>State Sync"]
style Overview fill:#2C3E50,color:#fff
style CH1 fill:#16A085,color:#fff
style CH2 fill:#E67E22,color:#fff
style CH3 fill:#7F8C8D,color:#fff
288 SDN Controller Basics
288.1 Learning Objectives
By the end of this chapter series, you will be able to:
- Understand Controller Architecture: Explain the internal components and message flow within an SDN controller
- Compare Major Controllers: Evaluate OpenDaylight, ONOS, Ryu, and Floodlight for different IoT deployment scenarios
- Design Controller APIs: Describe northbound (REST) and southbound (OpenFlow) API interactions
- Implement High Availability: Apply controller clustering and failover strategies for production deployments
- Select Controllers for IoT: Choose appropriate SDN controllers based on scale, language, and feature requirements
288.2 Prerequisites
Before diving into this chapter, you should be familiar with:
- SDN Fundamentals and OpenFlow: Understanding the basic SDN architecture, control/data plane separation, and OpenFlow protocol is essential for grasping controller internals
- Networking Basics: Knowledge of network protocols, routing, and packet forwarding provides context for controller decision-making
- IoT Reference Models: Familiarity with layered IoT architectures helps understand where controllers fit in the system design
Think of the SDN controller as the brain of a traffic control system.
In a traditional network, each router or switch makes its own decisions - like individual traffic lights operating independently. An SDN controller centralizes all decision-making, like a smart city traffic control center that coordinates every intersection.
Simple Analogy:
| Traditional Network | SDN with Controller |
|---|---|
| Each device has its own brain | One central brain (controller) |
| Devices communicate via shouting | Controller tells each device what to do |
| Hard to coordinate | Easy network-wide changes |
| Each device learns slowly | Controller has instant global view |
What the controller does:
- Receives events - “A new device connected!” or “Link failed!”
- Makes decisions - “Route traffic via path A” or “Block this IP”
- Programs switches - Sends flow rules telling switches how to forward packets
Why this matters for IoT:
- Thousands of devices - Controller manages them all from one place
- Dynamic networks - Controller adapts instantly when sensors join/leave
- Security - Controller can isolate compromised devices network-wide
The controller is software running on a server - it’s not a special hardware box. Popular controllers include OpenDaylight (enterprise), ONOS (telecom), Ryu (education), and Floodlight (performance).
288.3 Chapter Overview
This topic has been organized into three focused chapters for easier learning:
288.3.1 1. SDN Controller Architecture
Read: SDN Controller Architecture (15 min)
Learn about the internal structure of SDN controllers:
- Controller components: Topology Discovery, Device Manager, Flow Manager, Statistics Collector, Policy Engine
- Message flow: Event-driven communication between applications, controller, and switches
- Reactive vs proactive: Trade-offs between latency (20-50ms vs <1ms) and flow table memory usage
- IoT implications: Pre-installing rules for sensor traffic patterns
288.3.2 2. SDN Controller Comparison
Read: SDN Controller Comparison (18 min)
Compare the four major open-source SDN controllers:
| Controller | Best For | Performance | Scalability |
|---|---|---|---|
| OpenDaylight | Enterprise, multi-protocol | 200K-500K flows/sec | 1K-5K devices |
| ONOS | Carrier-grade, smart cities | 1M+ flows/sec | 10K+ devices |
| Ryu | Learning, prototyping | 50K-100K flows/sec | <1K devices |
| Floodlight | High performance apps | 300K-600K flows/sec | 1K-3K devices |
288.3.3 3. SDN APIs and High Availability
Read: SDN APIs and High Availability (25 min)
Understand how to build production-ready SDN deployments:
- Northbound APIs: REST, gRPC, NETCONF for application integration
- Southbound APIs: OpenFlow messages (Packet-In, Flow-Mod, Stats-Request)
- Clustering strategies: Active-Standby, Active-Active, DHT-based
- State synchronization: Raft consensus, eventual consistency, failover behavior
288.4 Quick Reference
288.4.1 Controller Selection Cheat Sheet
| Your Situation | Recommended Controller | Why |
|---|---|---|
| Learning SDN | Ryu | Python, simple, great tutorials |
| Production IoT (10K+ devices) | ONOS | Scale, clustering, 1M+ flows/sec |
| Enterprise (mixed protocols) | OpenDaylight | Comprehensive feature set |
| Performance-critical | Floodlight | 600K flows/sec, optimized pipeline |
288.4.2 Key Metrics to Remember
| Metric | Value | Context |
|---|---|---|
| Reactive flow latency | 20-50ms | Controller computes path |
| Proactive flow latency | <1ms | Pre-installed rules |
| Cluster failover | 3-10s | Switch detects, requests new master |
| State sync overhead | 5-10ms | Raft consensus latency |
| Optimal cluster size | 3 nodes | Survives 1 failure, minimal overhead |
Deep Dives: - SDN Fundamentals and OpenFlow - OpenFlow protocol basics and architecture - SDN Analytics and Implementations - Traffic engineering and network slicing
Protocols: - Routing Fundamentals - Network routing concepts - RPL Routing - IoT-specific routing
Architecture: - Software Defined Networking - SDN overview - SDN Production and Review - Deployment strategies
Advanced Topics: - SDN for IoT: Variants and Challenges - Scalability and optimization - Edge-Fog Computing - Distributed control planes
Learning: - Simulations Hub - SDN simulation tools - Network Design and Simulation - SDN testing
Related Learning Resources:
- Simulations Hub: Try the Network Topology Visualizer to see how SDN controllers manage different network structures. Practice controller concepts with Mininet simulations.
- Videos Hub: Watch SDN controller demonstrations showing OpenDaylight, ONOS, and Ryu in action.
- Quizzes Hub: Test your understanding of controller architecture, API design, and high availability with SDN quizzes.
- Knowledge Gaps Hub: Address common misconceptions about controller performance, clustering, and API design patterns.
288.5 Summary
Key Takeaways:
- Controller architecture has three layers: Application (northbound), Control (core services), Infrastructure (southbound)
- Major controllers have different strengths: OpenDaylight (features), ONOS (scalability/HA), Ryu (simplicity), Floodlight (performance)
- Northbound APIs (REST/gRPC) allow applications to program the network without OpenFlow knowledge
- Southbound APIs (OpenFlow/NETCONF) control network devices with standardized protocols
- Clustering provides high availability (99.99%+) but at performance cost (10-25% slower)
- Controller selection depends on deployment scale, reliability requirements, and ecosystem integration needs
Practical guidelines:
- Start with Ryu for learning (days to proficiency)
- Use ONOS for production IoT requiring high availability (weeks to proficiency)
- Consider OpenDaylight for complex enterprise with mixed devices (months to proficiency)
- Deploy 3-node clusters for 99.99%+ uptime requirements
- Use REST APIs for application integration, not direct OpenFlow manipulation
288.6 What’s Next
Start with the chapter that matches your learning goal:
- SDN Controller Architecture - Understand how controllers work internally
- SDN Controller Comparison - Choose the right controller for your project
- SDN APIs and High Availability - Build production-ready deployments
Then continue to:
- SDN for IoT: Variants and Challenges: Explore IoT-specific SDN optimizations
- SDN Analytics and Implementations: Learn traffic engineering and real deployments
Hands-on practice:
- Install Ryu and run simple learning switch
- Deploy Mininet to simulate SDN network with 100 IoT devices
- Compare OpenDaylight and ONOS performance in your environment