Computer Engineering is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

SDN in the data centre

How SDN is used inside modern data centre networks: central control, flow-based forwarding, overlays (VxLAN), oversubscription, and practical issues including MTU and flow-table scaling.

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 in the data centre lets network engineers control many switches from a central program instead of configuring each device by hand. This enables fast provisioning of tenant networks, traffic engineering (bandwidth/latency allocation), and integration with virtualization (VM mobility, NFV).

Key ideas

Start from first principles and build up.

  • Software-Defined Networking (SDN) — a network architecture in which the control plane (decisions about where to send traffic) is separated from the data plane (the device that forwards packets). Assume a reliable control channel between controller and switches for correct operation.

  • Data centre — a collection of compute, storage and network resources organised to host services and virtual machines (VMs). Typical topology layers: access (server ToR switches), aggregation (layer to concentrate traffic), and core (east-west and north-south routing). Modern fabrics commonly use leaf–spine (Clos) with ECMP instead of a strict three-tier design; the oversubscription concept still applies.

  • Control plane — the logical component that computes network-wide state: routes, access policies, flow rules. In SDN this runs in the controller (software on a server).

  • Data plane — the forwarding hardware/software on switches that matches packet fields and applies actions (forward, drop, rewrite).

  • Flow — a set of packets that share matching fields (example fields: source/destination IP, TCP/UDP ports, VLAN ID). A flow table stores rules that match flows and specify actions.

  • OpenFlow — a commonly used southbound API (protocol between controller and switches). The controller sends commands (flow-mod) and switches send events (packet-in) via OpenFlow.

  • Overlay network (VxLAN) — a tunnelling method that encapsulates a tenant L2 frame inside UDP/IP so virtual networks can span the data centre. This decouples physical topology from tenant L2 addressing. Default UDP destination port is 4789; a 24-bit VNI allows ~16 million segments (far more than 4096 VLANs).

  • Oversubscription — the ratio of aggregate access bandwidth to aggregate uplink (or core) bandwidth. It describes how much bandwidth is shared and is a key design metric. Oversubscription >1 means potential contention under full load.

  • TCAM — a specialised hardware memory in switches used for high-speed ternary (masked) matching of flow entries. It is fast but limited and power-hungry, so flow-table footprint matters.

  • MTU (Maximum Transmission Unit) — the largest IP packet size (bytes, including the IP header but excluding Layer-2 headers) that a link accepts without fragmentation. When adding overlays (VxLAN) outer headers increase packet size; either underlay IP MTU must be increased (jumbo frames) or fragmentation/drop can occur.

Diagrams to draw (exam answers often require sketches):

  • Draw a three-tier data centre (access switches with servers, aggregation, core) and label bandwidths on access and uplink links. Show controller connected (logically) to each switch.
  • Draw VxLAN encapsulation: inner Ethernet frame, then outer headers: UDP, IP, outer Ethernet. Label byte sizes you use in calculations.
  • Draw OpenFlow packet path: packet arrives at switch; no matching flow -> packet-in to controller; controller sends flow-mod; subsequent packets matched in switch.

Assumptions to state in answers: reliable control-channel latency negligible for steady-state; flow arrival model (elephant vs mice) when justifying proactive vs reactive flows; switch TCAM capacity must be considered for per-tenant rules.

Formulas

Oversubscription = Total_access_bandwidth / Total_uplink_bandwidth — Total_access_bandwidth: sum of server access link rates (bits/s), Total_uplink_bandwidth: sum of uplink capacity (bits/s). Use when designing aggregation.

Required_underlay_IP_MTU = Inner_IP_packet_size + Inner_Ethernet_header(14) + Outer_IP(20) + UDP(8) + VxLAN(8) — Units: bytes. Assumes IPv4 without options; add 20 bytes if the outer IP header is IPv6, and add 4 bytes if an outer 802.1Q VLAN tag is used. Use when computing MTU for overlays.

Flow_entries_fit = floor(TCAM_capacity_bytes / Avg_entry_size_bytes) — TCAM_capacity_bytes: capacity of table, Avg_entry_size_bytes: average bytes used per flow entry. Use for capacity planning.

OpenFlow match/action syntax to remember (example form, not language grammar): in_port=1,eth_type=0x0800,ip_proto=6,ipv4_dst=10.0.0.5,tp_dst=80 -> actions=output:2 — this matches packet fields and forwards to port 2.

Worked examples

  1. Oversubscription calculation (numerical, step-by-step) Given: 20 servers each with 10 Gbit/s NIC to ToR (access). Aggregation has two uplink ports of 40 Gbit/s each to the core. Step 1: Total_access_bandwidth = 20 × 10 Gbit/s = 200 Gbit/s. Step 2: Total_uplink_bandwidth = 2 × 40 Gbit/s = 80 Gbit/s. Step 3: Oversubscription = 200 / 80 = 2.5. Answer: Oversubscription = 2.5 : 1. Interpretation: if many VMs send traffic simultaneously across uplinks, average per-server bandwidth will be reduced by this ratio under full load.

  2. MTU and VxLAN header (numerical) Problem: A VM sends an IP packet of 1500 bytes (standard MTU) inside a VxLAN overlay. Outer headers add overhead; compute required underlay IP MTU. Step 1: Inner_IP_packet_size = 1500 bytes. Step 2: Encapsulation_overhead = inner Ethernet header (14) + IPv4(20) + UDP(8) + VxLAN(8) = 50 bytes. (Assumes IPv4 with no options; if an outer 802.1Q VLAN tag is present, add 4 bytes.) Step 3: Required MTU (underlay IP) = 1500 + 50 = 1550 bytes. Answer: Required MTU = 1550 bytes. If physical network MTU stays 1500, VxLAN packets may be fragmented or dropped; solution: enable jumbo frames (increase MTU to >=1550) or use path MTU discovery and accept overhead.

  3. OpenFlow reactive flow install (algorithm trace) Small network: Switch S, Host A -> Host B. No initial flow entry. Step 1: Host A sends packet to Host B; packet arrives at S and no matching flow is found in the flow table. Step 2: S sends a packet-in message to the controller carrying packet header (or whole packet depending on configuration). Step 3: Controller computes action: install a flow that matches traffic A->B and sets action output to port for B. Controller sends a flow-mod message to S. Step 4: S installs the flow entry in its table and forwards the original packet according to the new rule. Step 5: Subsequent packets from A to B match locally and are forwarded at line rate without controller involvement. This trace shows the extra latency on first-packet due to controller interaction and TCAM usage for each new flow.

Common mistakes

  • Forgetting outer header bytes when computing MTU for overlays (VxLAN/Geneve/NVGRE).
  • Assuming unlimited flow-table capacity; not all switches can store per-flow rules for millions of mice flows.
  • Confusing oversubscription ratio direction (it is access / uplink, not uplink / access).
  • Sketching diagrams without labelling link bandwidths or controllers, making network-design answers ambiguous.

For your exam

Kinds of questions you will see:

  • Definitions and short notes: define SDN, OpenFlow, overlay (VxLAN), TCAM, oversubscription.
  • Derivation/short calculation: compute oversubscription, required MTU with encapsulation, flow-table capacity given TCAM size.
  • Diagram question: draw three-tier data centre and locate controller and flow paths; or draw VxLAN encapsulation stack.
  • Long question: explain pros/cons of reactive vs proactive flows; design a flow-table strategy for a multi-tenant data centre.
  • Trace/algorithm: show sequence of messages for a reactive OpenFlow flow install.

What a full-marks answer includes:

  • Precise definitions of bolded terms (control plane, data plane, flow).
  • Clear assumptions stated (e.g., IPv4 headers without options, MTU baseline 1500 bytes) and units.
  • Diagrams with labels (switches, links, bandwidth, controller) and an explanation of flows.
  • For calculations: show formulas, substitute numbers with units, show steps and final result highlighted.
  • For design answers: trade-offs (scalability vs responsiveness), mention TCAM limits, use of overlays (VxLAN) for tenant isolation, and where NFV or SDN controllers tie in.

Quick check

  1. What is oversubscription?
  2. Name one reason to use VxLAN in a data centre.
  3. In OpenFlow reactive mode, which message does the switch send to the controller when it has no matching flow? Answers: Oversubscription = total access bandwidth divided by total uplink bandwidth; VxLAN allows L2 networks to span the physical fabric (tenant isolation/VM mobility) without reconfiguring physical switches; packet-in.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?