Control and data planes
Control plane and data plane separation in SDN: what each plane does, why separation helps, costs (latency, bandwidth), and how to analyse controller overheads and packet processing.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Software-defined networking (SDN) separates the control plane from the data plane, so network behaviour is programmable from a controller. Engineers use this separation to centralise policy, automate flow setup, and scale or reconfigure switches without changing device firmware (see OpenFlow switch and protocol, Flow tables, matching and pipeline processing).
Key ideas
Start with definitions (every term defined before use):
Data plane: the part of a network device (switch, router) that forwards user packets according to local forwarding state. It performs per-packet operations (match, modify, forward) at line rate.
Control plane: the logic that builds and updates the forwarding state (routing, flow rules). In SDN the control plane is placed in a separate software component called the SDN controller.
Logical centralisation: a statement often used as a defining property of SDN: "The control plane is logically centralized." Exact meaning: a single abstract controller view manages many data-plane devices; physical controllers may be distributed for reliability but present a single logical state.
Southbound interface: the protocol (for example, OpenFlow) and API used by the controller to program device forwarding state.
Northbound API: the interface exposed by the controller to applications and orchestration systems to express policy and retrieve network state (often REST/gRPC or SDKs); it remains logically centralized even if the controller cluster is distributed.
Flow: a set of packets that match a common rule (fields such as IP src/dst, TCP ports, VLAN id). A flow table stores rules and actions used by the data plane.
Exact statement often required in exams:
Definition (SDN separation principle). In SDN, the forwarding function executed at line rate is separated from the network-wide decision logic that creates forwarding state. Assumptions: reliable out-of-band or in-band communications exist between controller and devices; devices can store and apply rules received from controllers.
Consequences derived from the separation (explainable from first principles):
Programmability: controller can update many devices by changing software only. This follows because the controller is the single point that issues rules to devices.
Global view: controller can compute network-wide policies (path selection, load balancing) because it can collect topology and statistics from many devices.
Trade-offs: placing control off the device creates new dependencies: controller-switch latency, control channel bandwidth usage, and potential single points of failure unless controllers are replicated.
What to draw (exam diagram instructions):
Diagram 1: Draw two boxes labelled "Switch A" and "Switch B". Inside each box show two parts: top half labelled Control plane (small CPU icon) and bottom half labelled Data plane (forwarding ASIC / TCAM). Draw a line between the two halves in each switch crossed out or faded to indicate separation. Draw a box labelled "SDN Controller" above them. Draw arrows labelled "southbound API (OpenFlow)" from controller to each switch. Label normal packet path through data plane (arrow across switches) and separate packet-in path to controller on flow miss.
Diagram 2 (for pipeline processing): draw a packet entering the switch, then an ordered sequence of boxes labelled "match", "action", "meter/acl", "output". Label flow table lookups and whether hits/ misses occur.
Interaction patterns to understand (exact descriptions):
Proactive mode: controller programs rules in devices in advance; packets are forwarded purely in data plane.
Reactive mode: on a flow table miss the device sends a control message (Packet-In) to controller which replies with Flow-Mod and/or Packet-Out; this introduces extra latency and control traffic.
Distribution choices: physical centralisation vs logical centralisation—explain that many controllers can be used in a cluster to give fault tolerance while still offering a logically centralized API.
Formulas
L_total = L_processing + L_transmission + L_propagation + L_queuing
- L_total: total packet latency through a link or device, seconds (s). Applies to packet-per-hop latency decomposition.
- L_processing: CPU/kernel processing time in device, s.
- L_transmission = Packet_size / Link_rate
- Packet_size: packet length in bits, bits (b). Link_rate: link capacity, bits per second (b/s).
- L_propagation: physical propagation delay, s (distance / propagation speed).
- L_queuing: queuing delay, s (depends on queue occupancy).
T_effective = C_link * U
- T_effective: effective throughput, bits per second (b/s).
- C_link: link capacity (b/s).
- U: utilization (0..1), dimensionless.
- Assumes negligible protocol overhead and no losses; in full-duplex switched Ethernet there are no collisions.
B_control = S_msg * R_flow_install
Additionally, for bidirectional reactive installs (Packet-In and Flow-Mod per new flow): B_control_bidir = (S_in + S_out) * R_flow_install
- B_control: control-plane bandwidth required for flow-install messages, bytes per second (B/s) or bits per second (b/s) if converted.
- S_msg: average size of one control message (bytes/message).
- R_flow_install: rate of flow-install events (messages per second).
- Use when estimating controller-switch bandwidth due to reactive installs.
When reasoning about reactive flow extra latency, use:
L_reactive_extra ≈ RTT_controller_switch + T_controller_proc
- RTT_controller_switch: round-trip time between switch and controller (s).
- T_controller_proc: controller processing time per flow (s).
- Applies when switch waits for controller to install rule before forwarding subsequent packets of new flow.
Worked examples
Example 1 — Packet processing trace (small flow table, algorithmic):
Given: an OpenFlow-like switch with a flow table containing two rules in priority order:
- Match: src=10.0.0.1, dst=10.0.0.2 -> Action: output port 2
- Match: eth_type=0x0800 (IPv4) -> Action: output port 3
Packet arrival sequence:
- Packet A: eth_type=0x0800, src=10.0.0.1, dst=10.0.0.2
- Packet B: eth_type=0x0800, src=10.0.0.5, dst=10.0.0.9
Trace steps for Packet A (numbered):
- Packet arrives at switch input.
- Data plane performs table lookup: rule 1 matches (exact src/dst). Apply action -> output port 2.
- Packet forwarded out port 2. (No controller involvement.)
Trace for Packet B:
- Packet arrives.
- Table lookup: rule 1 does not match, rule 2 matches (IPv4). Action -> output port 3.
- Packet forwarded out port 3.
If a packet C with no matching rule arrives, device sends Packet-In to controller; controller responds with Flow-Mod to install appropriate rule. This is the reactive path and causes extra latency.
Example 2 — Numerical: controller bandwidth from reactive installs.
Problem: A datacenter switch sees 2000 new flows per second. Each Packet-In message is 200 bytes and each Flow-Mod response is 300 bytes. Estimate control-plane bandwidth consumed (bi-directional) in bits per second.
Solution (numbered steps):
- Compute bytes per second: incoming Packet-In bytes/s = 2000 flows/s * 200 B = 400,000 B/s.
- Outgoing Flow-Mod bytes/s = 2000 * 300 B = 600,000 B/s.
- Total bytes/s = 400,000 + 600,000 = 1,000,000 B/s.
- Convert to bits/s: 1,000,000 B/s * 8 = 8,000,000 b/s = 8 Mb/s.
Answer: 8 Mb/s of control-plane bandwidth required. (Assumes each flow causes exactly one Packet-In and one Flow-Mod; real systems may batch or compress messages.)
Example 3 — Numerical: added latency for reactive install.
Problem: Switch-to-controller RTT = 10 ms, controller processing per flow = 2 ms. Estimate extra latency for the first packet of a reactive flow if switch waits for flow install before forwarding.
Solution:
- Extra latency ≈ RTT + controller processing = 10 ms + 2 ms = 12 ms.
- If the switch performs a Packet-In and the controller responds with Packet-Out (the controller instructs the switch to emit the buffered packet), the RTT term already measures the round trip.
Answer: ~12 ms extra for the first packet of a reactive flow under these assumptions.
Notes on assumptions: many controllers batch messages, and in some switches the first packet may be buffered or dropped; results change if in-band control shares bandwidth with data traffic.
Common mistakes
Confusing management plane with control plane. Management plane is for configuration, monitoring and out-of-band admin; control plane builds forwarding state used at line rate.
Forgetting to convert bytes to bits when computing bandwidth (B/s vs b/s).
Ignoring controller processing or RTT when asked for reactive-flow latency: both can dominate.
Drawing packet path through controller for every packet, instead of only for a flow-miss in reactive mode.
For your exam
Question types you will see: definitions (define control plane / data plane), short notes (advantages/disadvantages of separation), diagram tasks (draw controller-switch architecture and label), derivations/estimates (control bandwidth from flow rates), and trace algorithms (step-by-step packet handling on a flow table). Sometimes an essay comparing reactive vs proactive flow installation.
What a full-marks answer includes:
- Precise definitions of control plane and data plane, and the meaning of logical centralisation.
- A clear diagram with controller, switches, southbound API, and both packet-forwarding and control-message paths labelled.
- For numerical questions: show formulas, units, conversions, and final answer with units in bold.
- For tracing questions: list steps when a packet arrives, including match-hit and miss handling and whether controller is involved.
Quick check
- Define the SDN control plane in one sentence.
- List two disadvantages of reactive flow installation.
- If a switch sends 1000 Packet-In messages per second at 250 B each, what is the control upstream bandwidth in Mb/s? Show conversion.
Answers: 1) The SDN control plane is the software logic that computes and installs forwarding state into data-plane devices, logically centralised and accessed via a southbound API. 2) Extra packet latency on flow-miss; increased control-plane bandwidth and potential controller overload. 3) 1000 * 250 B/s = 250,000 B/s = 2,000,000 b/s = 2 Mb/s.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?