Professional Documents
Culture Documents
A Network in A Laptop: Rapid Prototyping For So7ware - Defined Networks
A Network in A Laptop: Rapid Prototyping For So7ware - Defined Networks
1
2
Wouldn’t
it
be
amazing…
if
systems
papers
were
runnable.
3
Wouldn’t
it
be
amazing…
If
systems
papers
made
replicaSng
their
results,
modifying
the
described
system,
and
sharing
it
with
others…
7
Demo
8
Demo
Topology:
Fat
Tree
&"'($
)**'(*+,"-$
,--'(-./"0$
.#*($
1#-($
!"#$%$
!"#$%$ !"#$/$
!"#$)$ !"#$0$
!"#$*$ !"#$1$
!"#$+$
9
described
in
Scalable
Commodity
Data
Center,
SIGCOMM
2008,
Al
Fares
et
al.
(1)
share-‐able
(2)
runs
on
hardware
10
11
Date
Nov
2009:
deadline
in
3
months
12
Resources:
a
laptop
13
Goal:
build/eval/demo
a
realisSc
new
networked
system
14
Why
not
a
real
system?
switch
s1
+
as
real
as
it
gets
-‐
a
pain
to
reconfigure
15
Why
not
networked
virtual
machines?
16
Why
not
a
simulator?
process
17
Problem
1:
Want
scale
with
unmodified
applicaSons.
→
Use
lightweight,
OS-‐
level
virtualizaSon.
18
OS-‐level
VirtualizaSon
Same
system,
different
view.
Almost
zero
overhead.
ex.
IMUNES,
Emulab
process
user
process
kernel
filesystem
filesystem
hostname
hostname
user
IDs
user
IDs
network
network
→
Use
So7ware-‐Defined
Networking.
20
Feature
Feature
Network OS
Feature
OS
Feature
Hardware
OS
Feature
Hardware
OS
Feature
Hardware
OS
Hardware
Feature
OS
Hardware
21
So7ware-‐Defined
Network
Feature
Feature
Network OS
OpenFlow
Packet
Forwarding
Packet
Forwarding
Packet
Packet
Forwarding
Forwarding
Packet
Forwarding
22
Mininet
Walkthrough
23
controller
switch s1
24
$> mn --topo minimal \ ! run
Mininet
--switch ovsk \ !
--controller ref! launcher
mn!
25
$> mn --topo minimal \ ! Hosts
--switch ovsk \ !
--controller ref!
mn!
pipes
/bin/bash! /bin/bash!
26
$> mn --topo minimal \ ! Hosts
--switch ovsk \ !
--controller ref!
unshare(CLONE_NEWNET)!
root
network
namespace
mn!
pipes
/bin/bash! /bin/bash!
h2 namespace h3 namespace
27
$> mn --topo minimal \ ! Links
--switch ovsk \ !
--controller ref!
ip link add
root
network
namespace
veth0 veth2
veth
pairs
mn!
veth1
veth3
pipes
/bin/bash! /bin/bash!
h2 namespace h3 namespace
28
$> mn --topo minimal \ ! Links
--switch ovsk \ !
--controller ref!
s1-‐eth1 s1-‐eth2
veth
pairs
mn!
h2-‐eth0
h3-‐eth0
pipes
/bin/bash! /bin/bash!
h2 namespace h3 namespace
29
$> mn --topo minimal \ ! Links
--switch ovsk \ !
--controller ref!
mn!
pipes
s1-‐eth1
s1-‐eth2
veth pairs
h2-‐eth0 h3-‐eth0
/bin/bash! /bin/bash!
h2 namespace h3 namespace
30
$> mn --topo minimal \ ! Switch
--switch ovsk \ !
--controller ref!
ofdatapath! ofprotocol!
unix
socket
mn!
raw
sockets
pipes
s1-‐eth1
s1-‐eth2
veth pairs
h2-‐eth0 h3-‐eth0
/bin/bash! /bin/bash!
h2 namespace h3 namespace
31
$> mn --topo minimal \ ! Controller
--switch ovsk \ !
--controller ref!
create
controller
root
network
namespace
ofdatapath! ofprotocol!
unix
socket
mn! controller!
raw
sockets
pipes
s1-‐eth1
s1-‐eth2
veth pairs
h2-‐eth0 h3-‐eth0
/bin/bash! /bin/bash!
h2 namespace h3 namespace
32
Virtual
Machine
root
network
namespace
ofdatapath! ofprotocol!
unix
socket
mn! controller!
raw
sockets
pipes
s1-‐eth1
s1-‐eth2
veth pairs
h2-‐eth0 h3-‐eth0
/bin/bash! /bin/bash!
h2 namespace h3 namespace
33
Mininet
example
commands
Create
a
network
using
mn
launcher:
mn --switch ovsk --controller nox --topo \ tree,depth=2,fanout=8
--test pingAll!
34
Apps
made
with
the
Mininet
API
35
EvaluaSon
36
Startup/Shutdown/Memory
fig-
Microbenchmarks
switches, tested in a Debian 5/Linux 2.6.33.1 VM on VMware
Fusion 3.0 on a MacBook Pro (2.4 GHz intel Core 2 Duo/6 GB).
Even in the largest configurations, hosts and switches start up in
will less than one second each.
nta-
ials, Operation Time (ms)
Create a node (host/switch/controller) 10
Run command on a host (’echo hello’) 0.3
Add link between two nodes 260
Delete link between two nodes 416
den- Start user space switch (OpenFlow reference) 29
hine Stop user space switch (OpenFlow reference) 290
Start kernel switch (Open vSwitch) 332
The
Stop kernel switch (Open vSwitch) 540
dis-
Table 3: Time for basic Mininet operations. Mininet’s startup
VM and shutdown performance is dominated by management of vir-
mine
M is
link
management
is
slow
tual Ethernet interfaces in the Linux (2.6.33.1) kernel and ip
link utility and Open vSwitch startup/shutdown time.
vely 38
40
Research
Examples
• Ripcord:
modular
data
center
• Asterix:
wide-‐area
load
balancing
• SCAFFOLD:
new
internet
architecture
• Distributed
snapshot
demo
41
Unexpected
Uses
• Tutorials
• Whole-‐network
regression
suites
• Bug
replicaSon
42
LimitaSons
43
Inherent
LimitaSons
• OS-‐level
virtualizaSon
one
kernel
only
• Linux
containers
Linux
programs
only
• Cannot
match
the
introspecSon
of
an
event-‐
driven
simulaSon
44
Performance
Fidelity
switch
process
p
c
cores
processes
46
Wouldn’t
it
be
amazing…
If
systems
papers
made
replicaSng
their
results,
modifying
the
described
system,
and
sharing
it
with
others…
openflow.org/mininet
50
51
The
SDN
Approach
Separate
control
from
the
datapath
– i.e.
separate
policy
from
mechanism
52
How
to
get
performance
fidelity?
• Careful
process-‐to-‐core
allocaSon
• Bandwidth
limits
• Scheduling
prioriSes
• Real-‐Sme
scheduling
• Scheduling
groups
w/resource
isolaSon
53
Why
not
processes?
54