OpenFlowTutorial ONS 1017 2011
OpenFlowTutorial ONS 1017 2011
Started
(1)
Copy
to
your
hard
disk
from
a
USB
Key
or
DVD:
h]p://www.openow.org/wk/index.php/OpenFlow_Tutorial
(note
the
underscore)
Brandon
Heller
Stanford
University
with
help
from
all
the
people
listed
on
the
next
few
pages
Glen
Gibb
Nicholas
Bas\n
Ali
Al-Shabibi
Tatsuya
Yabe
Masayoshi
Kobayashi
Yiannis
Yiakoumis
Ali
Yahya
Te-Yuan
Huang
Bob
Lantz
David
Erickson
Videographer:
Yiannis
Yiakoumis
Welcome
Ge#ng
Started
(1)
Copy
to
your
hard
disk
from
a
USB
Key
or
DVD:
h]p://www.openow.org/wk/index.php/OpenFlow_Tutorial
(note
the
underscore)
Agenda
Time
9:30-10:45
11:00-12:00
1:30-2:30
2:45-4:00
Descrip@on
Introduc\on:
Mo\va\on,
History,
Interface
What
can
you
do
with
OpenFlow
and
SDN?
SDN
Building
Blocks
SDN
Deployment
Panel
and
Wrap-up
Why OpenFlow?
10
Feature
Opera\ng
System
Specialized
Packet
Forwarding
Hardware
Million
of
lines
of
source
code
5400 RFCs
Barrier to entry
Power Hungry
Research
Stagna\on
Lots
of
deployed
innova\on
in
other
areas
OS:
lesystems,
schedulers,
virtualiza\on
DS:
DHTs,
CDNs,
MapReduce
Compilers:
JITs,
vectoriza\on
13
Open
Systems
Performance
Scale
Fidelity
Real
User
Trac?
Complexity
Open
Simula\on
medium
medium
no
medium
yes
Emula\on
medium
low
no
medium
yes
Soqware
Switches
poor
low
yes
medium
yes
NetFPGA
high
low
yes
high
yes
Network
Processors
high
medium
yes
high
yes
Vendor
Switches
high
high
yes
low
no
14
Controller
Flow Switch
Flow Switch
Flow Switch
Host B
Host
A
Flow Switch
15
16
17
How
does
OpenFlow
work?
18
Ethernet Switch
19
20
21
OpenFlow Example
Soqware
Layer
Controller
PC
OpenFlow
Client
Flow
Table
Hardware
Layer
MAC
src
MAC
IP
dst
Src
IP
Dst
TCP
TCP
Ac\on
sport
dport
5.6.7.8
port 1
5.6.7.8
port 2
port 3
port 1
port 4
1.2.3.4
22
OpenFlow
Basics
Flow
Table
Entries
Rule
Ac\on
Stats
Eth
type
IP
Src
IP
Dst
L4
L4
IP
IP
ToS
Prot
sport
dport
Examples
Switching
Switch
MAC
Port
src
*
MAC
Eth
dst
type
00:1f:..
*
VLAN
IP
ID
Src
IP
Dst
IP
Prot
TCP
TCP
Ac\on
sport
dport
IP
Dst
IP
Prot
TCP
TCP
Ac\on
sport
dport
port6
Flow
Switching
Switch
MAC
Port
src
MAC
Eth
dst
type
VLAN
IP
ID
Src
17264 80
port6
Firewall
Switch
MAC
Port
src
*
MAC
Eth
dst
type
*
VLAN
IP
ID
Src
IP
Dst
IP
Prot
TCP
TCP
Ac\on
sport
dport
22
drop
24
Examples
Rou\ng
Switch
MAC
Port
src
*
MAC
Eth
dst
type
VLAN
IP
ID
Src
IP
Dst
5.6.7.8 *
VLAN
IP
ID
Src
IP
Dst
IP
Prot
vlan1 *
TCP
TCP
Ac\on
sport
dport
port6,
port7,
*
*
port9
IP
Prot
TCP
TCP
Ac\on
sport
dport
*
port6
VLAN
Switching
Switch
MAC
Port
src
*
MAC
Eth
dst
type
00:1f..
*
25
Centralized
Control
Controller
OpenFlow
Switch
Distributed
Control
Controller
OpenFlow
Switch
OpenFlow
Switch
Controller
OpenFlow
Switch
OpenFlow
Switch
Controller
OpenFlow
Switch
26
Flow-Based
Aggregated
Every
ow
is
individually
set
up
by
controller
Exact-match
ow
entries
Flow
table
contains
one
entry
per
ow
Good
for
ne
grain
control,
e.g.
campus
networks
27
Reac\ve
Proac\ve
First
packet
of
ow
triggers
controller
to
insert
ow
entries
Ecient
use
of
ow
table
Every
ow
incurs
small
addi\onal
ow
setup
\me
If
control
connec\on
lost,
switch
has
limited
u\lity
Controller
pre-populates
ow
table
in
switch
Zero
addi\onal
ow
setup
\me
Loss
of
control
connec\on
does
not
disrupt
trac
Essen\ally
requires
aggregated
(wildcard)
rules
28
29
Op\cal
Circuits
BUT
eorts
underway
to
apply
OpenFlow
model
to
circuits
OF
v1.2+
extensible
match
generalized
matching
and
ac\ons:
an
instruc\on
set
for
networking
31
32
[Hands-on
Tutorial]
Overview
33
TutorialFlow
34
NOX
Beacon
Reference
Controller/Switch
Open
vSwitch
Mininet
iperf
tcpdump
Wireshark
35
Tutorial
Setup
Controller
c0
port6633
loopback
(127.0.0.1:6633)
OpenFlow
Tutorial
3hosts-1switch
topology
s1
OpenFlow
Switch
s1-eth0
h1-eth0
h2
10.0.0.2
s1-eth1
h3-eth0
h3
10.0.0.3
virtual hosts
loopback
(127.0.0.1:6634)
dpctl
(user
space
process)
s1-eth2
h4-eth0
h4
10.0.0.4
36
Hands-on
Tutorial
Next
presenta\on
starts
at
11:00:
What
can
you
do
with
OpenFlow
/
SDN?
Instruc\ons
s\ll
at:
www.openow.org/wk/index.php/OpenFlow_Tutorial
37
What
is
Soqware-
Dened
Networking
(SDN)?
39
Status Quo
Closed
App
App
App
Opera\ng
System
Ap
p
Specialized
Packet
Forwarding
Hardware
App
App
Ap
p
Ap
p
Opera\ng
System
Specialized
Packet
Forwarding
Hardware
App
Opera\ng
System
App
Specialized
Packet
Forwarding
Hardware
App
App
Opera\ng
System
App
App
App
Specialized
Packet
Forwarding
Hardware
Opera\ng
System
Specialized
Packet
Forwarding
Hardware
40
App
App
App
App
App
Opera\ng
System
Ap
p
Specialized
Packet
Forwarding
Hardware
App
App
Ap
p
Ap
p
Opera\ng
System
Specialized
Packet
Forwarding
Hardware
App
Opera\ng
System
App
Specialized
Packet
Forwarding
Hardware
App
App
Opera\ng
System
App
App
App
Specialized
Packet
Forwarding
Hardware
Opera\ng
System
Specialized
Packet
Forwarding
Hardware
41
App
App
App
Simple
Packet
Forwarding
Hardware
Simple
Packet
Forwarding
Hardware
Simple
Packet
Forwarding
Hardware
Simple
Packet
Forwarding
Hardware
42
Isolated slices
App
App
Network
Opera\ng
System
1
App
App
Network
Opera\ng
System
2
App
App
Network
Opera\ng
System
3
App
Network
Opera\ng
System
4
Simple
Packet
Forwarding
Hardware
43
Others
Removing
spanning
tree
Network
visualiza\on
Network
debugging
Packet-circuit
convergence
Home
networks
Flexible
access
control
Scale-out
routers
Scale-out
data
centers
44
Demo
FlowVisor
OpenPipes
Load Balancing
PlugNServe
Energy Savings
ElasticTree
Mobility
MobileVMs
Traffic Engineering
Aggregation
Wireless Video
OpenRoads
45
OpenFlow
switches
Flows
Packet
processors
46
OpenFlow
Switch
OpenFlow
Protocol
OpenFlow
Switch
PlugNServe
Load-balancer
OpenRoads
Demo
OpenFlow
Protocol
FlowVisor
OpenPipes
Policy
OpenPipes
Mix resources
Test
48
Plug-n-Serve:
OpenFlow
means
Complete
control
over
trac
within
the
network
Visibility
into
network
condi\ons
Ability
to
use
exis\ng
commodity
hardware
This demo runs on top of the FlowVisor, sharing the same physical network with other experiments and produc.on trac.
49
50
Elas\cTree:
51
52
Intercon\nental VM Migra\on
53
openow.org/videos
54
Video Time
55
Hands-on
Tutorial
Next
presenta\on
starts
at
1:30:
SDN
Building
Blocks
Instruc\ons
s\ll
at:
www.openow.org/wk/index.php/OpenFlow_Tutorial
56
57
oops
Monitoring/
debugging
tools
openseer
Stanford
Provided
ENVI
(GUI)
NOX
LAVI
Beacon
FlowVisor
Console
Commercial
Switches
HP,
NEC,
Pronto,
Juniper..
and
many
more
n-Cas\ng
Trema
Expedient
Applica\ons
ONIX
Controller
Maestro
Slicing
Soqware
FlowVisor
Stanford
Provided
Soqware
Ref.
Switch
NetFPGA
Broadcom
Ref.
Switch
OpenWRT
PCEngine
Open
vSwitch
WiFi
AP
OpenFlow
Switches
58
NEC IP8800
WiMax (NEC)
HP Procurve 5400
Netgear 7324
PC Engines
Pronto 3240/3290
Ciena Coredirector
More coming
soon...
59
Virtualize
Notes
HP
Procurve
5400zl
or
6600
1
OF
instance
per
VLAN
NEC IP8800
1
OF
instance
per
VLAN
1
OF
instance
per
switch
60
Open
Controllers
Name
Lang
PlaXorm(s) License
Original
Author
Notes
OpenFlow
Reference
Linux
OpenFlow
License
Stanford/
Nicira
NOX
Python,
Linux
C++
GPL
Nicira
no longer maintained
Beacon
Java
Win,
Mac,
Linux,
Android
GPL
(core),
David
FOSS
Licenses
Erickson
for
your
code
(Stanford)
Maestro
Java
Win,
Mac,
Linux
LGPL
Zheng
Cai
(Rice)
Trema
Ruby, C
Linux
GPL
NEC
RouteFlow
Linux
Apache
CPqD (Brazil)
61
all 1M
plus flows
in one
box!
CPU: 1 x Intel Core i7 930 @ 3.33ghz, 9GB RAM, Ubuntu 10.04.1 x64
For
more
tes\ng
details,
see:
h]p://www.openow.org/wk/index.php/Controller_Performance_Comparisons
62
63
Growing
Community
Vendors and start-ups
More...
Note: Level of interest varies
More...
64
Related
Research
DIFANE
Rule
par\\oning
for
controller-less
ow
inser\on
Tesseract
Centralized
WAN
in
the
4D
Architecture
ONIX
Fault-tolerant
controller
plaGorm
from
Nicira,
Google,
NEC
DevoFlow
Prac\cal
scalability
limits
to
OpenFlow
and
modica\ons
65
to
get
around
them
Virtualizing OpenFlow
66
Trend
App
App
App
Windows
Windows
Windows
(OS)
(OS)
(OS)
Linux
Linux
Linux
App
App
App
Mac
Mac
Mac
OS
OS
OS
Virtualiza\on
layer
x86
(Computer)
Computer Industry
Controller
11
NOX
Controller
(Network
OS)
Controller
Controller
Network
OS
2
2
Virtualiza\on
or
Slicing
OpenFlow
Network Industry
Isolated slices
App
App
Network
Opera\ng
System
1
App
App
Network
Opera\ng
System
2
App
App
Network
Opera\ng
System
3
App
Network
Opera\ng
System
4
Simple
Packet
Forwarding
Hardware
68
Flow Table
Controller
Flow Table
Controller
Production VLANs"
69
FlowVisor-based
Virtualiza\on
Heidis
Controller
Aarons
Controller
Topology
discovery
is
per
slice
Craigs
Controller
OpenFlow
Protocol
OpenFlow FlowVisor
& Policy Control
OpenFlow
Switch
OpenFlow
Protocol
OpenFlow
Switch
OpenFlow
Switch
70
Multicast
Broadcast
http
Load-balancer
OpenFlow
Protocol
dl_dst=FFFFFFFFFFFF
tp_src=80, or
tp_dst=80
OpenFlow
FlowVisor & Policy Control
OpenFlow
Switch
OpenFlow
Protocol
OpenFlow
Switch
OpenFlow
Switch
71
Bob
Controller
Cathy
Controller
OpenFlow
Policy
Check:
Is
this
rule
allowed?
Policy
Check:
Who
controls
this
packet?
FlowVisor
OpenFlow
OpenFlow
Firmware
Data
Path
Rule
Excep\on
MAC
Eth
dst
type
VLAN
IP
ID
Src
IP
Dst
IP
Prot
TCP
TCP
sport
dport
84.65.* *
84.65.* *
74
Switch
MAC
Port
src
MAC
Eth
dst
type
VLAN
IP
ID
Src
IP
Dst
IP
Prot
TCP
TCP
sport
dport
AaIP
!AaIP *
*
75
76
Live
Stanford
Deployment
Sta\s\cs
h]p://yuba.stanford.edu/o}allway/wide-ofv1.html
77
4.
5.
6.
7.
Kansas State
79
National
Lambda
Rail
GENI
Integra\on
FlowVisor
Expedient3
Slicing control
Expedient
Experimenters
portal
for
slice
management
GENI API
API X
Expedient1
API X
Opt-in Mgr1
Expedient2
API X
Opt-in Mgr2
FlowVisor API
FlowVisor API
Opt-in
Manager
Network
admins
portal
to
approve/
deny
expt
requests
for
trac
FlowVisor1
OpenFlow
Substrate
1
FlowVisor2
OpenFlow
Substrate
2
Mistakes
we
made
OpenFlow
over
Q-in-Q
OpenFlow
rou\ng
is
unaware
and
sends
trac
with
same
MAC
address
in
both
direc\on,
causing
perpetual
learning
and
CPU
ina\on
Be be]er prepared
Grow topology
Wean o
OpenFlow
Tutorial
3hosts-1switch
topology
s1
OpenFlow
Switch
s1-eth0
h1-eth0
h2
10.0.0.2
s1-eth1
h3-eth0
h3
10.0.0.3
virtual hosts
loopback
(127.0.0.1:6634)
dpctl
(user
space
process)
s1-eth2
h4-eth0
h4
10.0.0.4
84
loopback
(127.0.0.1:7000)
c0
FlowVisor
port
6633
OpenFlow
Tutorial
3hosts-1switch
topology
loopback
(127.0.0.1:6634)
s1
OpenFlow
Switch
s1-eth0
h1-eth0
h2
10.0.0.2
s1-eth1
h3-eth0
h3
10.0.0.3
virtual hosts
loopback
(127.0.0.1:6634)
dpctl
(user
space
process)
s1-eth2
h4-eth0
h4
10.0.0.4
85
FlowVisor
Usage
man
./doc/owvisor.8
<owvisor
dir>/script/fvctl.sh
listDevices
getLinks
createSlice
listSlices
addFlowSpace
listFlowSpace
Highlights
of
Deployments
Stanford
deployment
McKeown
group
for
1.5
years:
produc\on
and
experiments
To
scale
later
this
year
to
en\re
building
(~500
users)
Global
trials
Over
60
organiza\ons
experimen\ng
2011
likely
to
be
a
big
year
for
OpenFlow
87
Current
Trials
68
trials/deployments
spanning
13
countries
88
Hands-on
Tutorial
Next
presenta\on
starts
at
2:45
SDN
Deployment
Forum
Instruc\ons
s\ll
at:
www.openow.org/wk/index.php/OpenFlow_Tutorial
90
SDN
Deployment
Forum
91
Our
speakers
Subhasree
Mandal
(Google)
Johan
van
Reijendam
(Stanford)
David
Erickson
(Stanford)
92
Ques\ons
What
was
your
hardest/funniest
error
to
debug?
Whats
your
one
strongest
gripe
about
OpenFlow?
Do
you
have
a
simple
example
of
something
that
your
network
does
be]er
now?
93
Closing
94
Closing
Thoughts
OpenFlow
is
a
protocol
How
to
use
it
is
up
to
you
Soqware-Dened
Networking
is
an
architecture
Of
which
OpenFlow
is
just
a
piece
Get
involved!
Ask
and
answer
ques\ons
on
mailing
lists:
openow-discuss
openow-spec