Software Defines Networking
Software Defines Networking
Department of Informatics
TU Mnchen Prof. Carle
Software Defined
Networking
Cornelius Diekmann
Contents
Motivation
Software Defined Networking The Idea
Implementation
A Network Operating System
OpenFlow
The Hardware
Programming the Controller
Programming Languages for Software
Defined Networks
Conclusion
Software Defined Networking 2
Motivation
A thought experiment
Languages such as C
Easier to program the hardware than in Assembly
Is translated to Assembly by a compiler
Operating systems
Provide abstraction of hardware, processes, file systems,
Languages such as C or Java
You can simply write your program
The operating system manages (most of) your resources
Some environments even manage your memory for you
VM1 VM3
Switch X
Switch Z
Hypervisor1 Hypervisor2
Example Switch
decide Spanning Tree Protocol
Lookup table
Control Plane
t
Forwarding Plane
forward
The Idea
and
VM1 to VM3: W X Y
VM2 to VM3: W Z Y
control plane
VM1 VM3
Switch X
Switch Z
Hypervisor1 Hypervisor2
forwarding plane
Software Defined Networking 14
SDN Benefits
Why the term `Software Defined'?
The control plane is just software.
Abstraction
No distributed state, there is a global network view centrally at
the control plane
No need to configure each forwarding plane device manually.
Everything can be managed centrally at the control plane
Simple forwarding plane device configuration. A forwarding plane
device model (like a high-level API) can be used to configure the
devices. No need to develop a separate protocol, deal with packet
loss, integrity of transferred data, distributed state, ...
Access Control
Desired behavior: VM1 cannot talk to VM3
VM1 VM3
Abstract
Switch network
VM2 VM4
model
Switch X
VM1 VM3
Switch Y Real
Switch W network
VM2 VM4 topology
Switch Z
Software Defined Networking [Shenker11] 18
SDN Benefits: Forwarding Abstraction
[Shenker11]
State abstraction
Global network view
Specification abstraction
High level API to express desired behavior
Forwarding abstraction
Simple model of forwarding `boxes'
Switch Z
Software Defined Networking 22
SDN: The Big Picture
Bottom-Up
All forwarding plane devices (switches) are connected to the single
control plane
A common standard (OpenFlow) provides an abstraction such that all
forwarding plane devices can be uniformly managed
Instead of distributed state in the forwarding plane devices, one global
network view is available
Appropriate abstractions (specification abstraction), depending on the
desired view, can be utilized to preprocess the global network view
E.g. one-big-switch for access control,
Top-Down
The control program defines the desired behavior
An operating system
Manages the hardware resources
Coordinate access to shared hardware resources.
E.g. if there is only one printer, print document1 first, then
document2, don't try to print them interleaved
Manage the hardware
E.g. put hard disk to sleep if idle, put packets from the NIC to
memory, ...
Ennobles the hardware
E.g. you can access /dev/sda as if it were a simple block device.
You don't have to care about whether it is a SSD, HDD, or raid
system
Provides a standardized API to the hardware resources
E.g. you normally don't open /dev/sda, you have a file system to
store and access data
Global Box X
Network VM1 Box Y VM3
View and VM2 Box W
VM4
state Box Z
Network Operating System
Hardware Interface: OpenFlow Forwarding
abstraction
Switch X
VM1 VM3 Real
Switch Y network
Switch W topology
VM2 VM4
Switch Z
Software Defined Networking 30
Implementation details
The hardware
Control
Plane
Lookup
t
table
Forwarding
Plane
VM1 VM3
VM2 VM4
VM2
Hypervisor1 Hypervisor2
Forwarding
Flow table Plane
Why not use commodity x86 PCs with Linux as open switches
Pros
Open, available, well-tested
Cons
Slow.
Your memory bus is approximately completely jammed at 10 GB/s
Low port density.
Did you recently see a PC with 100+ Ethernet ports?
Cons
Reliability, but there are means to conquer this
Controller
E.g. a common x86 PC
OpenFlow
ssl
Flow
table
Hypervisor1 Hypervisor2
OpenFlow
[OFwp08]
Software Defined Networking 42
OpenFlow Actions
If a packet matches a flow table entry, the following basic actions can be
performed
Forward
Forward packet to a switch's given port(s)
A flow table entry is installed after the first packet of a flow has
been observed
Afterwards, all packets that belong to the flow are forwarded by
the switch directly
Possible problems
When to delete old flow table entries?
Always keep in mind: OpenFlow is just one tiny aspect of SDN and better
alternatives may be thought of. But, you can buy OpenFlow switches!
Only one match can apply to a packet but multiple actions can be
performed per match
Action
Statistics
Byte and packet counter per flow
/* forward packets */
if KnownHosts.contains(pk.MACaddr_dst):
out_port = KnownHosts[pk.MACaddr_dst]
send_packet_out(sw, {
output_payload = pk.input_payload;
apply_actions = [Output (PhysicalPort out_port)]
})
else:
/* unknown destination port, flooding to all */
send_packet_out(sw,{
output_payload = pk.input_payload;
apply_actions = [Output AllPorts]
})
send_packet_out(sw, {
output_payload = pk.input_payload;
apply_actions = [Output (PhysicalPort out_port)]
})
else:
/* flooding as before */
Once source and destination ports are known, flow table entries are
installed
Why are rules only installed if both ports are known? I.e.
If A B then Port(m)
If B A then Port(n)
Imagine a packet with src MAC address A arrives at port n and one
would install the rule
If * A then Port(n)
Now, all packets, destined to A will be automatically forwarded by the
switch. The controller will never see them.
In particular, the controller will never learn the port for B
let hub =
if inPort = 1 then fwd(2,3,4)
elsif inPort = 2 then fwd(1,3,4)
elsif inPort = 3 then fwd(1,2,4)
elsif inPort = 4 then fwd(1,2,3)
in hub
Assume we wrote a controller that collect statistics and one that does
firewalling
We want to collect the statistics in parallel with applying the firewalling.
Afterwards, our learning switch should forward all packets the firewall
let through
Code:
( statistics | firewall ) >> learning_switch
Abstractions
Innovation at software speed
Implementation
Controller, specifies what we want
special programming languages (an active research area) provide
easy-to-use means to program it
The controller runs on a
Network Operating System
provides easy-to-use API, keeps central state
and manages the hardware (forwarding plane) using
OpenFlow
an open standard which allows programming the forwarding plane
devices
Software Defined Networking 61
Bibliography