What is Software-Defined Networking (SDN)?
Learn what SDN is, how it separates control and data planes, and how OpenFlow controllers programmatically manage networks.
Expected Interview Answer
Software-Defined Networking (SDN) is an architecture that separates the network’s control plane (deciding how traffic should flow) from its data plane (actually forwarding packets), centralizing control logic in a software controller that programs the underlying switches through an open protocol such as OpenFlow.
In a traditional network, each router or switch independently runs its own control-plane logic and makes local forwarding decisions using distributed protocols. SDN instead lifts that decision-making into a centralized (or logically centralized) controller that has a global view of the network and pushes flow rules down to simple, fast forwarding devices via a southbound API like OpenFlow. Applications and network operators talk to the controller through northbound APIs, letting them programmatically reconfigure traffic paths, enforce policy, or reroute around failures without touching individual devices by hand. This decoupling is what makes data-center and cloud networks programmable, automatable, and easier to reconfigure at scale, and it underpins technologies like network virtualization and dynamic load balancing.
- Centralizes control logic for a global view of the network
- Enables programmatic, automated reconfiguration at scale
- Decouples control plane from data plane forwarding hardware
- Simplifies policy enforcement and dynamic traffic engineering
AI Mentor Explanation
SDN is like a franchise replacing each ground’s independent local umpiring committee with one head office that watches every match live and radios exact instructions to on-field umpires, who simply execute the calls. The umpires (forwarding devices) no longer decide policy themselves; they just apply what the head office (the controller) tells them. Because one office sees every ground at once, it can shift a rule across the whole league instantly instead of updating each ground’s committee separately, which is exactly the operational win SDN gives network operators.
Step-by-Step Explanation
Step 1
Separate the planes
Control-plane decision logic is removed from individual switches and centralized in an SDN controller.
Step 2
Southbound programming
The controller pushes flow rules to switches via a protocol like OpenFlow so they know how to forward traffic.
Step 3
Northbound APIs
Applications and operators query and reprogram the network through APIs exposed by the controller.
Step 4
Dynamic reconfiguration
The controller can reroute traffic, enforce policy, or respond to failures network-wide from one place.
What Interviewer Expects
- Correct definition: separation of control plane and data plane
- Knows the controller pushes rules via a southbound API (e.g., OpenFlow)
- Understands northbound APIs let applications program the network
- Can explain the practical benefit: centralized, programmable control
Common Mistakes
- Confusing SDN with NFV (SDN is about control-plane centralization, not virtualizing appliances)
- Thinking every switch still makes its own routing decisions in SDN
- Not knowing OpenFlow as a concrete southbound protocol example
- Assuming SDN requires proprietary hardware rather than commodity switches
Best Answer (HR Friendly)
“Software-Defined Networking means moving the “brain” of the network out of individual switches and into one central piece of software that can see the whole network and reprogram how traffic flows. Instead of manually reconfiguring dozens of devices, a network engineer can push one policy change from the controller and have it apply everywhere instantly, which is why cloud providers rely on it heavily.”
Code Example
from dataclasses import dataclass
@dataclass
class FlowRule:
match_src_ip: str
match_dst_ip: str
action: str # e.g. "forward:eth2" or "drop"
priority: int = 100
def push_flow_rule(switch_id: str, rule: FlowRule) -> None:
# In real SDN this call goes over OpenFlow to the switch’s flow table
print(f"Programming switch {switch_id}: "
f"if src={rule.match_src_ip} dst={rule.match_dst_ip} "
f"-> {rule.action} (priority={rule.priority})")
controller_rules = [
FlowRule(match_src_ip="10.0.0.5", match_dst_ip="10.0.0.9", action="forward:eth2"),
FlowRule(match_src_ip="10.0.0.13", match_dst_ip="0.0.0.0/0", action="drop", priority=200),
]
for rule in controller_rules:
push_flow_rule(switch_id="switch-1", rule=rule)Follow-up Questions
- What is the difference between the control plane and the data plane?
- What role does OpenFlow play in an SDN deployment?
- How does SDN relate to network function virtualization (NFV)?
- What happens to network availability if the SDN controller goes down?
MCQ Practice
1. What does SDN primarily decouple?
SDN separates the control plane (decision logic) from the data plane (packet forwarding).
2. Which protocol is commonly used as an SDN southbound interface?
OpenFlow is a widely used southbound protocol for a controller to program switch flow tables.
3. In SDN, what does the centralized controller expose to applications?
Northbound APIs let applications and operators query and program the network through the controller.
Flash Cards
What is SDN? — An architecture that centralizes network control logic in a software controller separate from packet forwarding.
Control plane vs data plane? — Control plane decides how to forward; data plane actually forwards packets.
Southbound protocol example? — OpenFlow — used by the controller to program switch flow tables.
Main SDN benefit? — Centralized, programmable, automatable control over the whole network.