Cmpe 252A: Computer Networks: An Introduction To Software Defined Networking (SDN) & Openflow
Cmpe 252A: Computer Networks: An Introduction To Software Defined Networking (SDN) & Openflow
An Introduction to
Software Defined Networking (SDN)
&
OpenFlow
Huazhe Wang
[email protected]
Tremendous success
From research experiment
to global infrastructure
Brilliance of under-specifying
Network: best-effort packet delivery
Hosts: arbitrary applications
1-2
Inside the ‘Net: A Different Story…
Closed equipment
Software bundled with hardware
Vendor-specific interfaces
Over specified
Slow protocol standardization
1-4
Traffic engineering: difficult for traditional
routing
5
3
2 v w 5
u 2 1
3 z
1
2
x 1 y
5
3
2 v w 5
u 2 1
3 z
1
2
x 1 y
1-6
Traffic engineering: difficult
5
3
v
v
w
w
2 5
zz
u 2 1
3
1
2
xx yy
1
1-7
Rethinking the “Division of Labor”
Network-layer functions
1-9
Traditional Computer Networks
Data plane:
Packet
streaming
Management plane:
Human time scale
Logically-centralized control
Smart,
slow
API to the data plane
(e.g., OpenFlow)
Dumb,
fast
Switches
1-13
Software defined networking (SDN) 3. control plane
functions
4.programmable external to
control routing
access
control
… load
balance data-plane
applications switches
Remote Controller
control
plane
data
plane
CA
CA CA CA CA 2. control,
data plane
separation
1: generalized“
flow-based”
forwarding (e.g.,
OpenFlow) 1-14
Software defined networking (SDN)
Why a logically centralized control plane?
easier network management: avoid router
misconfigurations, greater flexibility of
traffic flows
table-based forwarding allows
“programming” routers
centralized “programming” easier: compute
tables centrally and distribute
distributed “programming: more difficult:
compute tables as result of distributed
algorithm (protocol) implemented in each and
every router
open (non-proprietary) implementation of
control plane
1-15
Analogy: mainframe to PC evolution *
Ap Ap Ap Ap Ap Ap Ap Ap Ap Ap
App
Specialized p p p p p p p p p p
Applications Open Interface
installed by controller
SDN Controller
API for table-based switch (network operating system)
control (e.g., OpenFlow)
defines what is controllable southbound API
…
OS): routing
maintain network state access load
information control balance
interacts with network northbound API
control
plane
control applications “above”
via northbound API
SDN Controller
interacts with network (network operating system)
switches “below” via
southbound API southbound API
implemented as distributed
system for performance, data
scalability, fault-tolerance, plane
robustness
SDN-controlled switches
1-18
SDN perspective: control applications
southbound API
data
plane
SDN-controlled switches
1-19
SDN: control/data plane interaction example
Dijkstra’s link-state
1 S1, experiencing link
Routing failure using OpenFlow
port status message to
4 5 notify controller
network RESTful … intent
2 SDN controller
graph API
receives OpenFlow
…
3 Application interface layer
s2 4 Dijkstra’s routing
algorithm access
s1 network graph info, link
s4
s3 state info in controller,
computes new routes 1-20
SDN: control/data plane interaction example
Dijkstra’s link-state
Routing
5 link state routing app
4 5 interacts with flow-
network RESTful … intent table-computation
graph API
component in SDN
controller, which
…
3 Application interface layer
s2
s1
s4
s3
1-21
OpenFlow (OF) defines the communication
protocol that enables the SDN Controller
to directly interact with the forwarding
plane of network devices.
OpenFlow data plane abstraction
flow: defined by header fields
generalized forwarding: simple packet-handling rules
Pattern: match values in packet header fields
Actions: drop, forward, modify, matched packet or send
matched packet to controller
Priority: disambiguate overlapping patterns
Counters: #bytes and #packets
* : wildcard
1. src=1.2.*.*, dest=3.4.5.* drop
2. src = *.*.*.*, dest=3.4.*.* forward(2)
3. src=10.1.2.3, dest=*.*.*.* send to controller 1-23
OpenFlow data plane abstraction
operates between
controller, switch
TCP used to
exchange messages
OpenFlow messages
1-26
OpenFlow: controller-to-switch messages
features: controller
queries switch features,
switch replies
configure: controller
queries/sets switch
configuration parameters
modify-state: add, delete,
modify flow entries in the
OpenFlow tables
packet-out: controller can
send this packet out of
specific switch port 1-27
OpenFlow: switch-to-controller messages
Network deployments
Eight campuses, and two research backbone networks
Commercial deployments (e.g., Google backbone)
1-29
Challenges
Heterogeneous Switches
access MAC IP
control look-up look-up
1-31
Controller Delay and Overhead
Controller is much slower the the switch
Processing packets leads to delay and
overhead
Need to keep most packets in the “fast path”
packets
1-32
Distributed Controller
For scalability
Controller and reliability Controller
Application Application
Partition and replicate state
Network OS Network OS
1-33
Testing and Debugging
OpenFlow makes programming possible
Network-wide view at controller
Direct control over data plane
1-34
Evolution of OpenFlow
1-35
Evolution of OpenFlow
P4 OpenFlow 2.0
1-36
Run OpenFlow Experiments
Mininet
1-37
Hedera: Dynamic Flow Scheduling
for Data Center Networks
Key insight/idea
Identify large flows and periodically rearrange them
to balance the load across core switches
Challenges
Estimate bandwidth demand of flows
Find optimal allocation network paths for flows
ECMP Paths
Many equal cost paths going up to the core switches
Only one path down from each core switch
Randomly allocate paths to flows using hash
Agnostic to available resources
Long lasting collisions between long (elephant) flows
S D
Collisions of elephant flows
S1 S2 S3 D2 S4 D1 D4 D3
Hedera Scheduler
1. Detect 2. Estimate 3. Schedule
Large Flows Flow Demands Flows
Two approaches
Simulated Annealing:
a numerical optimization technique for searching for a
solution in a space otherwise too large for ordinary
search methods to yield results
Optimizations
Assign a single core switch to each destination host
Incremental calculation of exceeded capacity
Using previous iterations best result as initial state
Evaluation
Evaluation
Data Shuffle
ECMP GFF SA Control
Total Shuffle Time (s) 438.4 335.5 336.0 306.4
Avg. Completion Time (s) 358.1 258.7 262.0 226.6
Avg. Bisection BW (Gbps) 2.81 3.89 3.84 4.44
Avg. host goodput (MB/s) 20.9 29.0 28.6 33.1
Dynamic workloads,
ECMP Hedera large flow turnover
faster than control
loop
Stable
Scheduler will be
Matrix Stability
continually chasing the
traffic matrix
Unstable
Need to include
penalty term for
unnecessary SA flow
Flow Size re-assignments
Conclusion
Rethinking networking
Open interfaces to the data plane
Separation of control and data
Leveraging techniques from distributed systems
Significant momentum
In both research and industry
1-64