Why software-defined networking
Why software-defined networking (SDN) separates control from forwarding to make networks programmable, easier to manage, and more adaptable for data-centre and campus networks.
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
SDN is used by network engineers to make network behaviour programmable, automate configuration, and respond faster to changing traffic patterns in data centres and enterprise networks. It reduces manual device-by-device management and enables features (like global traffic engineering, rapid security policy updates, and automation) that are hard to implement reliably in traditional networks.
Key ideas
Start from first principles and simple definitions:
- Network device: any hardware or software that forwards, processes or inspects packets (examples: switch, router, virtual switch). Use this before talking about forwarding.
- Forwarding plane (data plane): the part of a device that performs fast packet forwarding decisions (match, modify, forward) on each packet. It must be high-throughput and low-latency.
- Control plane: the logic that makes decisions about where traffic should go (routing algorithms, topology, policy). It computes forwarding rules which are installed into the data plane (e.g., into switch flow tables).
- Separation of control and data planes: the architectural principle of removing control logic from forwarding devices and running it on separate software components.
- Logically centralized control: the view that a single control program has a global view of the network state and computes forwarding for many devices. "Logically" means the control may run on one or many physical machines but appears as a single controller to the network.
- Southbound API: the interface a controller uses to program forwarding devices (example: OpenFlow).
- Northbound API: the interface consumers (applications, orchestrators) use to express policy to the controller.
- Flow: a set of packets grouped by matching header fields (e.g., 5-tuple: source IP, dest IP, source port, dest port, protocol). A flow is the unit SDN often uses for control.
Key principles (state them as you would in an answer):
- Principle (Separation): "If the control-plane logic is moved out of forwarding devices and exposed through well-defined APIs, the network becomes programmable." Assumptions: forwarding devices can be instructed quickly and reliably; a controller can learn or be given topology and state.
- Principle (Logical centralization): "A logically centralized control element simplifies global functions (routing, access policy, load balancing) because it has network-wide visibility." Assumptions: controller(s) can obtain accurate, timely state; network latency to devices is acceptable for control operations.
- Trade-off (Centralization vs distribution): "Centralization simplifies global policy but creates concerns about latency, scalability and availability; practical SDN uses distributed controllers or clustering to address those issues." State these explicitly in an exam answer and explain the assumptions required to argue either side.
Derivation universities commonly ask for: show how centralized control can implement a consistent global flow rule with multiple switches.
- Setup to draw: draw three switch boxes (S1, S2, S3) arranged left-to-right. Above them draw one controller box labeled C. Draw arrows from C down to each switch (bidirectional). Label arrow text "southbound API (e.g., OpenFlow)". On each switch box draw a small table labeled "Flow Table" with example entries (match, action, counters).
- Explanation steps: controller learns topology (LLDP or link discovery), computes paths (e.g., shortest path), then programs flow entries into S1..S3. If an event (link failure) arrives as a notification to C, C recomputes and updates flow tables. To ensure a consistent network-wide update (avoiding transient loops/blackholes), the controller uses a two-phase or versioned update: pre-install new rules (or versions) on all switches, use barriers/bundles to confirm installation, then switch ingress traffic to the new version or adjust priorities, and finally remove old rules.
Where I am unsure (flag for reviewer): exact recommended controller-cluster sizes and latency limits for production data centres — these depend on design and implementation details and should be checked for specific numbers.
Formulas
Throughput = Data transferred / Time — Throughput is in bits per second (bit·s^-1). Applies to measured data-plane throughput for links or flows.
Bandwidth-delay product (BDP) = Bandwidth × RTT — Bandwidth in bits per second (bit·s^-1), RTT (round-trip time) in seconds (s), BDP result in bits. Use to estimate how much data is "in flight" on a path; important when the controller changes paths and when considering buffer sizing.
Queue delay ≈ Queue length (bits) / Link bandwidth (bit·s^-1) — queue delay in seconds; approximate, useful to reason about added latency from buffering.
No special programming syntax to memorise for this topic beyond: southbound operations are typically of the form "add flow(match, actions, priority, timeout)" in most controller APIs; know these parameters.
Worked examples
Example 1 — Flow-table matching trace (exam-style algorithmic trace): Problem: Given an OpenFlow-like flow table with entries (highest priority first):
- Match: dstIP=10.0.0.5 -> Action: output to port 3
- Match: dstIP=10.0.0.0/24 -> Action: output to port 2
- Match: * (default) -> Action: drop Trace packets: (A) dst=10.0.0.5, (B) dst=10.0.0.12, (C) dst=192.168.1.1. Show action for each. Solution steps:
- Packet A: check entry 1 (exact match) -> matches -> output to port 3.
- Packet B: check entry 1 -> no; check entry 2 -> 10.0.0.12 is in 10.0.0.0/24 -> output to port 2.
- Packet C: entry 1 no; entry 2 no; default entry 3 matches -> drop. This trace shows prioritisation and longest-prefix/exact match behaviour.
Example 2 — Bandwidth-delay product calculation (numerical):
Problem: Link bandwidth 1 Gbit/s, RTT 40 ms. Compute BDP and bytes in flight.
Formula: BDP = Bandwidth × RTT.
Calculation: BDP = 1×10^9 bit·s^-1 × 0.040 s = 40×10^6 bits = 40,000,000 bits.
Bytes in flight = 40,000,000 / 8 = 5,000,000 bytes = 5,000,000 B (≈4.77 MiB).
Use: TCP window should be at least this to fully utilise the link.
Example 3 — Short-answer model question: "Explain how SDN can speed up a security policy update compared to traditional networks." Model answer points to include:
- In traditional networks, update means logging into many devices and changing ACLs or distributed control-plane policies; error-prone and slow.
- With SDN, a controller pushes flow rules (or updates a network-wide policy) through the northbound interface to all affected devices using the southbound API; fewer manual steps.
- Mention transaction-style updates (installing rules in a coordinated order) and methods like two-phase updates or versioned rules to avoid transient inconsistencies.
- Conclude with limitations: controller latency, device programming speed, and the need for atomicity mechanisms.
Common mistakes
- Assuming immediate packet-level control for very high packet rates; programming flow tables has cost and not every packet should be handled by the controller.
- Forgetting priorities and wildcard matching rules when tracing flow tables.
- Ignoring controller-to-switch latency and capacity when claiming a controller can reconfigure the whole network "instantly." Also, do not rely on any tie-break between overlapping flow entries with equal priority; in OpenFlow such cases are undefined and must be avoided by assigning distinct priorities.
For your exam
Question types you will see: definitions, short notes (compare and contrast), diagram-based descriptions (draw controller and switches), derivations/arguments (show why separation helps), trace problems (flow table matching), numerical calculations (BDP, throughput), and design questions (controller placement, availability strategies).
What full-marks answers include:
- Clear definitions of key terms (control plane, data plane, southbound, northbound, flow).
- A labelled diagram when required (draw controller(s), switches, flow-tables; label southbound API arrows and an application using northbound API).
- Stepwise explanation of how an event (link failure or new policy) is handled by SDN versus traditional networks.
- When asked for pros and cons, list both benefits (programmability, global view, faster innovation) and limitations (scalability, controller placement, consistency issues).
- For numericals, show formulas with units, plug numbers, carry units through, and give final answer with units.
Quick check
- What is the southbound API used for in SDN?
- Give the formula for bandwidth-delay product and its unit.
- In a flow-table, which entry is chosen if two entries match a packet: one exact and one wildcard with same priority?
Answers: 1) Controller → switch programming interface (e.g., install flow rules). 2) BDP = Bandwidth × RTT with result in bits (bandwidth in bit·s^-1, RTT in s). 3) The entry with higher priority; if the same priority and overlapping matches, OpenFlow does not define a tie-break—controllers must avoid such cases by assigning distinct priorities. In exams: rely on priority; do not assume any tie-break unless specified.
Notes for reviewer: I have flagged uncertainty about recommended controller-cluster sizing and specific production latency limits above; I have clarified that equal-priority overlapping matches are undefined in OpenFlow, so students should not assume any exact-match preference without explicit specification.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?