openflowtutorial ons heller

135
Ge#ng Started (1) Copy to your hard disk from a USB Key or DVD: Copy needed files (VirtualBox, terminal, possibly an X server) for your plaGorm (Win/Mac/Linux) Copy Java 6 and Eclipse for your plaGorm, if you want to use Java Copy VM image: OpenFlowTutorial101311.zip Pass on the DVD or USB key to someone else! (2) Unzip OpenFlowTutorial101311.zip (3) Point browser to instruc\ons: h]p://www.openflow.org/wk/index.php/OpenFlow_Tutorial (note the underscore) You should NOT need to download any large files – spare the WiFi! 1

Upload: kobevnu

Post on 28-Apr-2015

179 views

Category:

Documents


19 download

TRANSCRIPT

Page 1: OpenFlowTutorial ONS Heller

Ge#ng  Started  •  (1)  Copy  to  your  hard  disk  from  a  USB  Key  or  DVD:  

–  Copy  needed  files  (VirtualBox,  terminal,  possibly  an  X  server)  for  your  plaGorm  (Win/Mac/Linux)  

–  Copy  Java  6  and  Eclipse  for  your  plaGorm,  if  you  want  to  use  Java  –  Copy  VM  image:  OpenFlowTutorial-­‐101311.zip  –  Pass  on  the  DVD  or  USB  key  to  someone  else!  

•  (2)  Unzip  OpenFlowTutorial-­‐101311.zip  

•  (3)  Point  browser  to  instruc\ons:  –  h]p://www.openflow.org/wk/index.php/OpenFlow_Tutorial  

(note  the  underscore)  

•  You  should  NOT  need  to  download  any  large  files  –  spare  the  WiFi!  

1  

Page 2: OpenFlowTutorial ONS Heller

Tutorial  1:  SDN  for  Engineers  

part  of  the  the  Open  Networking  Summit  Santa  Clara  Marrio]  

April  16,  2012  

Brandon  Heller,  Rob  Sherwood,  David  Erickson,  Hideyuki  Shimonishi,  Srini  Seetharaman,  Murphy  McCauley  

only  possible  help  from  all  the  people    listed  on  the  next  few  pages  

2  

Page 3: OpenFlowTutorial ONS Heller

Ge#ng  Started  •  (1)  Copy  to  your  hard  disk  from  a  USB  Key  or  DVD:  

–  Copy  needed  files  (VirtualBox,  terminal,  possibly  an  X  server)  for  your  plaGorm  (Win/Mac/Linux)  

–  Copy  Java  6  and  Eclipse  for  your  plaGorm,  if  you  want  to  use  Java  –  Copy  VM  image:  OpenFlowTutorial-­‐101311.zip  –  Pass  on  the  DVD  or  USB  key  to  someone  else!  

•  (2)  Unzip  OpenFlowTutorial-­‐101311.zip  

•  (3)  Point  browser  to  instruc\ons:  –  h]p://www.openflow.org/wk/index.php/OpenFlow_Tutorial  

(note  the  underscore)  

•  You  should  NOT  need  to  download  any  large  files  –  spare  the  WiFi!  

3  

Page 4: OpenFlowTutorial ONS Heller

Welcome  

4  

Page 5: OpenFlowTutorial ONS Heller

Who’s  in  this  room?  

5  

Page 6: OpenFlowTutorial ONS Heller

Who’s  in  this  room?  

>=  3:  

•  HP  >=  19  •  Cisco  >=  15  •  Juniper  >=  7  •  Huawei  >=  6  •  Brocade  >=  4  •  ZAO  >=  3  •  Google  >=  3  Plus  >=  60  companies  w/2  or  less..  

6  

Page 7: OpenFlowTutorial ONS Heller

Who’s  in  this  room?  

•  Engineer  •  Senior  Engineer  •  Principal  Systems  Engineer  

•  Dis\nguished  Engineer  •  Senior  Dis\nguished  Engineer    •  Senior  Technical  Marke\ng  Engineer  

7  

Page 8: OpenFlowTutorial ONS Heller

Who’s  in  this  room?  

•  Student  •  Graduate  Student  •  PhD  /  Doctor  •  Senior  Research  Scien\st  •  Professor  

8  

Page 9: OpenFlowTutorial ONS Heller

Who’s  in  this  room?  

•  CTO  •  VP  •  Founder  •  Solu\ons  Architect  •  Cloud  Architect  •  Chief  Tech  Expert  •  Chief  

9  

Page 10: OpenFlowTutorial ONS Heller

Goals  

10  

Page 11: OpenFlowTutorial ONS Heller

Overall  Goal:  

think  cri\cally  about  SDN  

11  

Page 12: OpenFlowTutorial ONS Heller

Goals  of  this  Tutorial  •  By  the  end,  everyone  should  know:  

–  Knowledge  about  SDN/OpenFlow  •  what  these  are  •  how  they  relate  •  what’s  available  now  •  where  it’s  going  •  how  it’s  used  

–  SDN  and  You  •  how  you  can  use  it  •  how  you  can  build  on  top  of  what’s  available  •  How  you  can  build  something  completely  new  

•  Have  fun  

12  

Page 13: OpenFlowTutorial ONS Heller

Agenda  Time   DescripEon  

9:00-­‐10:00   OpenFlow/SDN  Introduc\on  

10:00-­‐10:30   The  SDN  Stack,  Part  1:  Switches  &  Controllers    

10:45-­‐12:00   The  SDN  Stack,  Part  2:  Virtualiza\on  &  SDN  Applica\ons  

12:00-­‐1:00   Lunch  

1:00-­‐3:00   Controllers  +  Q&A  

3:15-­‐4:15   Hands-­‐On  

4:20-­‐5:00   SDN  Deployment  Experiences  and  Wrap-­‐up  

13  

Page 14: OpenFlowTutorial ONS Heller

SDN  +  OpenFlow  History  

14  

Page 15: OpenFlowTutorial ONS Heller

Why  OpenFlow?  

[Historical  mo\va\ons,  for  researchers]  

15  

Page 16: OpenFlowTutorial ONS Heller

Million  of  lines  of  source  code  

5400  RFCs   Barrier  to  entry  

Billions  of  gates   Complex   Power  Hungry  

Many  complex  func\ons  baked  into  the  infrastructure  OSPF,  BGP,  mul.cast,  differen.ated  services,  Traffic  Engineering,  NAT,  firewalls,  MPLS,  redundant  layers,  …  

An  industry  with  a  “mainframe-­‐mentality”  Li]le  ability  for  non-­‐telco  network  operators  to  get  what  they  want  Func\onality  defined  by  standards,  put  in  hardware,  deployed  on  nodes  

The  Networking  Industry  (2007)  

Specialized  Packet  Forwarding  Hardware  

Opera\ng  System  

Feature   Feature  

Rou\ng,  management,  mobility  management,    access  control,  VPNs,  …  

16  

Page 17: OpenFlowTutorial ONS Heller

Ossifica\on  

17  

Source: http://www.merriam-webster.com/

Page 18: OpenFlowTutorial ONS Heller

Research  Stagna\on  (circa  2007):  Faster  networks  but  not  beFer  networks  •  Lots  of  deployed  innova\on  in  other  areas  

– OS:  filesystems,  schedulers,  virtualiza\on  – DS:  DHTs,  CDNs,  MapReduce  –  Compilers:  JITs,  new  language  paradigms    

•  Networks  are  largely  the  same  as  years  ago  –  Ethernet,  IP,  WiFi  

•  Rate  of  change  of  the  network  seems  slower  in  comparison  – Need  be]er  tools  and  abstrac\ons  to  demonstrate  and  deploy  

18  

Page 19: OpenFlowTutorial ONS Heller

Another  problem:  Closed  Systems  (Vendor  Hardware)  

•  Can’t  extend  •  Stuck  with  interfaces  (CLI,  SNMP,  etc)  

•  Hard  to  meaningfully  extend  

•  Hard  to  meaningfully  collaborate  

•  Vendors  star\ng  to  open  up,  but  not  usefully  

19  

Page 20: OpenFlowTutorial ONS Heller

Open  Systems  

Performance  Fidelity  

Scale   Real  User  Traffic?  

Complexity   Open  

Simula\on   medium   medium   no   medium   yes  

Emula\on   medium   low   no   medium   yes  

Soyware  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  

gap  in  the  tool  space  none  have  all  the  desired  a]ributes!  

20  

Page 21: OpenFlowTutorial ONS Heller

Ethane,  a  precursor  to  OpenFlow  Centralized,  reac\ve,  per-­‐flow  control  

Controller  

Flow Switch

Host  A  Host  B  

Flow Switch

Flow Switch

Flow Switch

See  Ethane  SIGCOMM  2007  paper  for  details  21  

Page 22: OpenFlowTutorial ONS Heller

Ethane’s  dumb,  simple  switches  might  be  more  broadly  useful…  

22  

Page 23: OpenFlowTutorial ONS Heller

OpenFlow:  a  pragma\c  compromise  

+    Speed,  scale,  fidelity  of  vendor  hardware  

+    Flexibility  and  control  of  soyware  and  simula\on  +    Vendors  don’t  need  to  expose  implementa\on  +    Leverages  hardware  inside  most  switches  today  (ACL  tables)  

23  

-­‐  Least-­‐common-­‐denominator  interface  may  prevent  using  all  hardware  features  

-­‐  Limited  table  sizes  

-­‐  Switches  not  designed  for  this  -­‐  New  failure  modes  to  understand  

Page 24: OpenFlowTutorial ONS Heller

How  does  OpenFlow  work?  

24  

Page 25: OpenFlowTutorial ONS Heller

Ethernet  Switch  

25  

Page 26: OpenFlowTutorial ONS Heller

26  

Page 27: OpenFlowTutorial ONS Heller

OpenFlow  Protocol  (SSL/TCP)  

27  

Page 28: OpenFlowTutorial ONS Heller

Controller  

PC  

Hardware  Layer  

Soyware  Layer  

Flow  Table  

MAC  src  

MAC  dst  

IP  Src  

IP  Dst  

TCP  sport  

TCP  dport  

Ac\on  

OpenFlow  Client  

*  *  5.6.7.8  *  *  *   port  1  

port  4  port  3  port  2  port  1  

1.2.3.4  5.6.7.8  

OpenFlow Example

28  

Page 29: OpenFlowTutorial ONS Heller

OpenFlow  Basics    Flow  Table  Entries  

Switch  Port  

MAC  src  

MAC  dst  

Eth  type  

VLAN  ID  

IP  Src  

IP  Dst  

IP  Prot  

L4  sport  

L4  dport  

Rule   Ac\on   Stats  

1.  Forward  packet  to  zero  or  more  ports  2.  Encapsulate  and  forward  to  controller  3.  Send  to  normal  processing  pipeline  4.  Modify  Fields  5.  Any  extensions  you  add!  

+  mask  what  fields  to  match  

Packet  +  byte  counters  

29  

VLAN  pcp  

IP  ToS  

Page 30: OpenFlowTutorial ONS Heller

Examples  Switching  

*  

Switch  Port  

MAC  src  

MAC  dst  

Eth  type  

VLAN  ID  

IP  Src  

IP  Dst  

IP  Prot  

TCP  sport  

TCP  dport  

Ac\on  

*   00:1f:..   *   *   *   *   *   *   *   port6  

Flow  Switching  

port3  

Switch  Port  

MAC  src  

MAC  dst  

Eth  type  

VLAN  ID  

IP  Src  

IP  Dst  

IP  Prot  

TCP  sport  

TCP  dport  

Ac\on  

00:20..   00:1f..   0800   vlan1   1.2.3.4   5.6.7.8   4   17264   80   port6  

Firewall  

*  

Switch  Port  

MAC  src  

MAC  dst  

Eth  type  

VLAN  ID  

IP  Src  

IP  Dst  

IP  Prot  

TCP  sport  

TCP  dport  

Ac\on  

*   *   *   *   *   *   *   *   22   drop  

30  

Page 31: OpenFlowTutorial ONS Heller

Examples  Rou\ng  

*  

Switch  Port  

MAC  src  

MAC  dst  

Eth  type  

VLAN  ID  

IP  Src  

IP  Dst  

IP  Prot  

TCP  sport  

TCP  dport  

Ac\on  

*   *   *   *   *   5.6.7.8  *   *   *   port6  

VLAN  Switching  

*  

Switch  Port  

MAC  src  

MAC  dst  

Eth  type  

VLAN  ID  

IP  Src  

IP  Dst  

IP  Prot  

TCP  sport  

TCP  dport  

Ac\on  

*   *   vlan1   *   *   *   *   *  

port6,    port7,  port9  

00:1f..  

31  

Page 32: OpenFlowTutorial ONS Heller

OpenFlow  is  not  enough.  

32  

Page 33: OpenFlowTutorial ONS Heller

OpenFlow  is  not  enough…  

•  Adds  the  ability  to  modify,  experiment…  •  But  s\ll  harder  than  it  should  be  to  add  features  to  a  network  

•  Effec\vely  assembly  programming  or  an  ISA  

33  

[OpenFlow  is  just  a  forwarding  table  management  protocol]  

Page 34: OpenFlowTutorial ONS Heller

It’s  hard  to  add  a  feature  to  a  network  •  It’s  not  just  that  we  lack  access  to  line-­‐rate  forwarding  that  we  can  control  

•  Fully  distributed  algorithms  are  hard,  especially  when  defined  at  the  protocol  level  

•  Your  protocol  must  implement  its  own  mechanisms  •  Must  work  on  constrained  and  heterogeneous  resources  

34  

This is where Software-Defined Networking comes in: need a control plane abstraction too

Page 35: OpenFlowTutorial ONS Heller

From  OpenFlow  to  SDN  

35  

Page 36: OpenFlowTutorial ONS Heller

36  

Page 37: OpenFlowTutorial ONS Heller

SDN  is  actually  much  older  than  ‘09  

•  Key  ideas  present  in  some  form  in  4D,  RCP,  Sane,  Ethane,  …  

37  

Page 38: OpenFlowTutorial ONS Heller

What  is  SDN,  opt.  1  

“The  McKeown  View”:  

Refactoring  Func\onality  

38  

Page 39: OpenFlowTutorial ONS Heller

Define  SDN  by  its  placement  of  func\onality.  

39  

Page 40: OpenFlowTutorial ONS Heller

Specialized  Packet  Forwarding  Hardware  

App   App   App  

Specialized  Packet  Forwarding  Hardware  

App   App   App  

Specialized  Packet  Forwarding  Hardware  

App  

App  

App  

Specialized  Packet  Forwarding  Hardware  

App   App   App  

Specialized  Packet  Forwarding  Hardware  

Opera\ng  System  

Opera\ng  System  

Opera\ng  System  

Opera\ng  System  

Opera\ng  System  

App   App   App  

40  

Today  Closed  Boxes,  Fully  Distributed  Protocols  

Closed  

Page 41: OpenFlowTutorial ONS Heller

Specialized  Packet  Forwarding  Hardware  

App   App   App  

Specialized  Packet  Forwarding  Hardware  

App   App   App  

Specialized  Packet  Forwarding  Hardware  

App  

App  

App  

Specialized  Packet  Forwarding  Hardware  

App   App   App  

Specialized  Packet  Forwarding  Hardware  

Opera\ng  System  

Opera\ng  System  

Opera\ng  System  

Opera\ng  System  

Opera\ng  System  

App   App   App  

Network  Opera\ng    System  

App   App   App  

“Soyware  Defined  Networking”  approach  to  open  it  

41  

Page 42: OpenFlowTutorial ONS Heller

App  

Simple  Packet  Forwarding  Hardware  

Simple  Packet  Forwarding  Hardware  

Simple  Packet  Forwarding  Hardware  

App   App  

Simple  Packet  Forwarding  Hardware   Simple  Packet  

Forwarding  Hardware  

Network  Opera\ng    System  

1.  Open  interface  to  hardware  

3.  Well-­‐defined  open  API  2.  At  least  one  good  opera\ng  system  

Extensible,  possibly  open-­‐source  

The  “Soyware-­‐defined  Network”  

42  

Page 43: OpenFlowTutorial ONS Heller

Simple  Packet    Forwarding  Hardware  

Network  Opera\ng    System  1  

Open  interface  to  hardware  

Virtualiza\on  or  “Slicing”  Layer  

Network  Opera\ng    System  2  

Network  Opera\ng    System  3  

Network  Opera\ng    System  4  

App   App   App   App   App   App   App   App  

Many  opera\ng  systems,  or  Many  versions  

Open  interface  to  hardware  

Isolated  “slices”  

Simple  Packet    Forwarding  Hardware  

Simple  Packet    Forwarding  Hardware  

Simple  Packet    Forwarding  Hardware  

Simple  Packet    Forwarding  Hardware  

43  

Page 44: OpenFlowTutorial ONS Heller

What  is  SDN,  opt.  2  

“The  Shenker  View”:  

Redefining  Abstrac\ons  

44  

Page 45: OpenFlowTutorial ONS Heller

Define  SDN  by  the  abstrac\ons  it  provides  to  soyware  (and  people  wri\ng  it).  

45  

Page 46: OpenFlowTutorial ONS Heller

“The  Shenker  View”  

•  Sco]  Shenker  has  a  killer  presenta\on  –  (Keynote  at  last  ONS)    – You  should  watch  this  – h]p://www.slideshare.net/mar\n_casado/sdn-­‐abstrac\ons  

– The  Future  of  Networking,  and  the  Past  of  Protocols  

•  Many  bullet  points  on  next  few  slides  are  from  this  talk  

46  

Page 47: OpenFlowTutorial ONS Heller

“The  Shenker  View”:  the  gist  

•  Network  control  planes  need  abstrac\ons  – Abstrac\ons  solve  architectural  problems  and  enable  evolvability  

– Today’s  layers  (L2,  L3,  ..)  are  good  abstrac\ons  but  terrible  for  control  interfaces  

•  Networks  work  because  we  can  master  complexity  – but  what  we  should  be  doing  is  extrac\ng  simplicity,  with  the  right  abstrac\ons  

47  

Page 48: OpenFlowTutorial ONS Heller

Programming  Made  the  Transi\on  

•  Machine  Languages:  no  abstrac\ons  •  Higher-­‐level  languages,  OS  +  other  abstrac\on  

– files,  virtual  memory,  data  structures,  …    

•  Modern  languages:  even  more  abstrac\ons  – objects,  garbage  collec\on,  threads,  locks,  …  

Abstrac\ons  simplify  programming:  they  make  it  easier  to  write,  maintain,  and  reason  about  programs.  

Could  networking  follow  this  same  path?  48  

Page 49: OpenFlowTutorial ONS Heller

Forwarding  Abstrac\on  

•  Forwarding  behavior  specified  by  a  control  program.      

•  Possibili\es:  x86,  MPLS,  OpenFlow  

49  

Page 50: OpenFlowTutorial ONS Heller

State  Distribu\on  Abstrac\on  

•  Control  program  should  not  have  to  handle  distributed-­‐state  details  

•  Proposed  abstrac\on:  global  network  view  •  Control  program  operates  on  network  view  

–  Input:  global  network  view  (graph)  – Output:  configura\on  of  each  network  device  

•  Network  OS  provides  network  view  

50  

Short  version:  programs  operate  on  graphs  

Page 51: OpenFlowTutorial ONS Heller

Specifica\on  Abstrac\on  

•  Give  control  program  abstract  view  of  network  •  Provide  enough  detail  to  specify  goals,  but  not  to  implement  them  

51  

Page 52: OpenFlowTutorial ONS Heller

What  is  SDN,  opt  3  

My  view:  

Opening  Up    Design  Axes  

52  

Page 53: OpenFlowTutorial ONS Heller

Define  SDN  not  by  what  it  looks  like  or  how  we  think  about  it,  but  the  flexibility  it  provides.  

53  

Page 54: OpenFlowTutorial ONS Heller

SDN  opens  up  implementa\on  design  axes.  

54  

Page 55: OpenFlowTutorial ONS Heller

An  SDN  is  any  network  that  gives  us  the  flexibility  to  choose  between  points  on  the  following  design  axes.  

55  

Page 56: OpenFlowTutorial ONS Heller

Centralized  vs  Distributed  Control  

Centralized  Control  

OpenFlow Switch

OpenFlow Switch

OpenFlow Switch

Controller  

Distributed  Control  

OpenFlow Switch

OpenFlow Switch

OpenFlow Switch

Controller  

Controller  

Controller  

56  

Page 57: OpenFlowTutorial ONS Heller

Microflow  vs.  Aggregated  

Microflow  

•  Every  flow  is  individually  set  up  by  controller  

•  Exact-­‐match  flow  entries  •  Flow  table  contains  one  

entry  per  flow  

•  Good  for  fine  grain  control,  policy,  and  monitoring,  e.g.  campus  

   Aggregated  

•  One  flow  entry  covers  large  groups  of  flows  

•  Wildcard  flow  entries  •  Flow  table  contains  one  

entry  per  category  of  flows  

•  Good  for  large  number  of  flows,  e.g.  backbone  

57  

Page 58: OpenFlowTutorial ONS Heller

Reac\ve  vs.  Proac\ve  (pre-­‐populated)  

Reac\ve  

•  First  packet  of  flow  triggers  controller  to  insert  flow  entries  

•  Efficient  use  of  flow  table  •  Every  flow  incurs  small  

addi\onal  flow  setup  \me  •  If  control  connec\on  lost,  

switch  has  limited  u\lity  •  Extremely  simple  fault  

recovery  

Proac\ve  

•  Controller  pre-­‐populates  flow  table  in  switch  

•  Zero  addi\onal  flow  setup  \me  

•  Loss  of  control  connec\on  does  not  disrupt  traffic  

•  Essen\ally  requires  aggregated  (wildcard)  rules  

58  

Page 59: OpenFlowTutorial ONS Heller

Virtual  vs  Physical  

Virtual  

•  Assumes  configurable  switching  within  a  host:  in  the  OS  or  hypervisor  

•  Soyware!    Memory,  processing,  arbitrary  modifica\ons  

•  Massive  flow  rates  •  Limited  to  the  hardware  

below  

Physical  

•  No  assump\on  of  soyware  changes;  unmodified  end  hosts  

•  Greater  control  over  expensive  forwarding  resources  

59  

Page 60: OpenFlowTutorial ONS Heller

Fully  Consistent  vs  Eventually  Consistent  

Fully  Consistent  

•  Certainty  about  state  •  Consistent  state  is  harder  

to  scale  •  Easier  to  reason  about  

state  and  its  transi\ons  •  May  eliminate  route  flaps  

Eventually  Consistent  

•  Uncertainty  about  state  now,  but  eventually  converges  

•  Probabilis\c  state  is  easier  to  scale  

•  Introduces  the  possibility  of  long-­‐lived  route  flaps  and  unstable  control  systems  

60  

Page 61: OpenFlowTutorial ONS Heller

Here’s  a  picture  

61  

Page 62: OpenFlowTutorial ONS Heller

These  axes,  today  (BGP):  

62  

Distributed

Microflow Aggregated

Reactive Proactive

Virtual Physical

Fully Consistent Eventually Consistent

Centralized

Many choices arise from assuming decentralized administration…

Page 63: OpenFlowTutorial ONS Heller

These  axes,  for  Ethane  

63  

Distributed

Microflow Aggregated

Reactive Proactive

Virtual Physical

Fully Consistent Eventually Consistent

Centralized

Many choices arise from assuming centralized administration…

Page 64: OpenFlowTutorial ONS Heller

These  axes,  for  Hedera:  

64  

Distributed

Microflow Aggregated

Reactive Proactive

Virtual Physical

Fully Consistent Eventually Consistent

Centralized

Hedera controls a data center network. See NSDI ‘10 paper for more details.

Page 65: OpenFlowTutorial ONS Heller

Your  SDN  network  or  applica\on?  

65  

Distributed

Microflow Aggregated

Reactive Proactive

Virtual Physical

Fully Consistent Eventually Consistent

Centralized

Hybrid approaches often have desirable properties; can use these now.

Page 66: OpenFlowTutorial ONS Heller

Example  applica\ons  and  their  places  on  the  scales  

66  

Page 67: OpenFlowTutorial ONS Heller

High-­‐order  bit  of  SDN:  

adds  flexibility  to  control-­‐plane  implementa\on  choices  

67  

Page 68: OpenFlowTutorial ONS Heller

SDN  examples  using  OpenFlow  Many  applica\ons  benefit  from  flexibility  

Stanford  Demos  

•  Wireless  mobility  

•  VM  mobility/migra\on  •  Network  virtualiza\on  •  Power  management  •  Hardware  •  Load  balancing  •  Traffic  Engineering  

Others  

•  Removing  spanning  tree  

•  Network  visualiza\on  •  Network  debugging  •  Packet-­‐circuit  convergence  •  Home  networks  

•  Flexible  access  control  •  Scale-­‐out  routers  •  Scale-­‐out  data  centers  

68  

Page 69: OpenFlowTutorial ONS Heller

What  SDN  really  means  is  up  in  the  air.  

Here’s  a  good  defini\on,  though:  

Soyware  Defined  Networking  (SDN)  is  a  refactoring  of  the  rela\onship  between  network  devices  and  the  soyware  that  controls  them.  

[Paraphrased  from  the  HotSDN  ‘12  Solicita\on]  

69  

Page 70: OpenFlowTutorial ONS Heller

The  SDN  Stack  

70  

Page 71: OpenFlowTutorial ONS Heller

The  SDN  Stack  

Controller  NOX  

Slicing  Soyware  FlowVisor  

FlowVisor  Console  

71  

Applica\ons  LAVI  ENVI  (GUI)   …  n-­‐Cas\ng  

NetFPGA  Soyware    Ref.  Switch  

Broadcom    Ref.  Switch  

OpenWRT  PCEngine      WiFi  AP  

Commercial  Switches  

OpenFlow  Switches  

…  

Monitoring/  debugging  tools  oflops  oyrace   openseer  

Open  vSwitch  

HP,  NEC,  Pronto,  Juniper..  and  many  

more    

Beacon   Trema   Maestro  

Page 72: OpenFlowTutorial ONS Heller

Switches  (all  OpenFlow  1.0  for  now)  

72  

Page 73: OpenFlowTutorial ONS Heller

Ciena Coredirector

NEC IP8800

Current  SDN  hardware  (as  of  ~2010)  

Ask your vendors

Juniper MX-series

HP Procurve 5400

Pronto 3240/3290

WiMax (NEC)

PC Engines Netgear 7324

73  

Page 74: OpenFlowTutorial ONS Heller

Commercial  Switches  

74  

Vendor   Models   Virtualize?   Notes   Pic  

HP  ProCurve  

5400zl,  6600,  +  

1  OF  instance  per  VLAN  

-­‐ LACP,  VLAN  and  STP  processing  before  OpenFlow  -­‐ Wildcard  rules  or  non-­‐IP  pkts  processed  in  s/w  

-­‐ Header  rewri\ng  in  s/w  -­‐ CPU  protects  mgmt  during  loop  

NEC   IP8800,  +  

1  OF  instance  per  VLAN  

-­‐ OpenFlow  takes  precedence  -­‐ Most  ac\ons  processed  in  hardware  

-­‐ MAC  header  rewri\ng  in  h/w  

Pronto/Pica8  

3290,  3780,  3920,  +  

1  OF  instance  per  switch  

-­‐ No  legacy  protocols  (like  VLAN  and  STP)  -­‐ Most  ac\ons  processed  in  hardware  

-­‐ MAC  header  rewri\ng  in  h/w  

Page 75: OpenFlowTutorial ONS Heller

Open  Switches  

75  

Name   Lang   PlaQorm(s)   License   Original  Author  

Notes  

OpenFlow  Reference  

C   Linux   OpenFlow  License  

Stanford/Nicira  

not  designed  for  extensibility  

Open  vSwitch  

C/Python  

Linux/BSD?   Apache  2.0   Ben  Pfaff/Nicira  

In  Linux  kernel  3.3+  

Indigo   C/Lua   Linux-­‐based  Hardware  Switches  

GPL  v2   Dan  Talayco/BigSwitch  

Bare  OpenFlow  switch  

Xorplus   ?   Linux-­‐based  Hardware  Switches  

?   Pica8   Support    

Page 76: OpenFlowTutorial ONS Heller

Ignore  these  slides.  Ask  your  vendor  for  the  latest.  

76  

Page 77: OpenFlowTutorial ONS Heller

What  you  cannot  do  with  OpenFlow  v1.0  

•  Non-­‐flow-­‐based  (per-­‐packet)  networking  –  ex.  Per-­‐packet  next-­‐hop  selec\on  (in  wireless  mesh)  –  yes,  this  is  a  fundamental  limita\on  

–  BUT  OpenFlow  can  provide  the  plumbing  to  connect  these  systems  

•  Use  all  tables  on  switch  chips  –  yes,  a  major  limita\on  (cross-­‐product  issue)  

–  BUT  OF  version  1.1  exposes  these,  providing  a  way  around  the  cross-­‐product  state  explosion  

77  

Page 78: OpenFlowTutorial ONS Heller

What  can  cannot  do  with  OpenFlow  v1.0  (2)  

•  New  forwarding  primi\ves  –  BUT  provides  a  nice  way  to  integrate  them  through  extensions  

•  New  packet  formats/field  defini\ons    –  BUT  extensible  matches  are  coming  in  v1.2/1.3+  

•  Op\cal  Circuits  –  BUT  efforts  underway  to  apply  OpenFlow  model  to  circuits  

•  Low-­‐setup-­‐\me  individual  flows  –  BUT  can  push  down  flows  proac\vely  to  avoid  delays  

Page 79: OpenFlowTutorial ONS Heller

Where  it’s  going  

•  OF  v1.0:  released  end  of  2009:  “Into  the  Campus”  

•  OF  v1.1:  released  March  1  2011:  “Into  the  WAN”  –  mul\ple  tables:  leverage  addi\onal  tables  –  tags  and  tunnels:  MPLS,  VLAN,  virtual  ports  

–  mul\path  forwarding:  ECMP,  groups  

•   OF  v1.2:  approved  Dec  8  2011:  “Extensible  Protocol”  –  extensible  match  –  extensible  ac\ons  –  IPv6  –  mul\ple  controllers  

79  

Page 80: OpenFlowTutorial ONS Heller

Controllers  

80  

Page 81: OpenFlowTutorial ONS Heller

Open  Controllers  

81  

Name   Lang   PlaQorm(s)   License   Original  Author  

Notes  

OpenFlow  Reference  

C   Linux   OpenFlow  License  

Stanford/Nicira  

not  designed  for  extensibility  

NOX   Python,  C++  

Linux   GPL   Nicira   ac\vely  developed  

Beacon   Java   Win,  Mac,  Linux,  Android  

GPL  (core),  FOSS  Licenses  for  your  code  

David  Erickson  (Stanford)  

run\me  modular,  web  UI  framework,  regression  test  framework  

Maestro   Java   Win,  Mac,  Linux  

LGPL   Zheng  Cai  (Rice)  

Trema   Ruby,  C   Linux   GPL   NEC   includes  emulator,  regression  test  framework  

RouteFlow   ?   Linux   Apache   CPqD  (Brazil)    virtual  IP  rou\ng  as  a    service  

Page 82: OpenFlowTutorial ONS Heller

Open  Controllers  (2)  

82  

Name   Lang   PlaQorm(s)   License   Original  Author  

Notes  

OpenFaucet   Python   Library  

Mirage   OCaml  

POX   Python   Any  

Floodlight   Java   Any   BigSwitch,  based  on  Beacon  

Too  many  to  easily  list  of  keep  track  of…  

Page 83: OpenFlowTutorial ONS Heller

Growing  list….  

•  Mar\n  Casado  recently  added  a  list:  •  h]p://yuba.stanford.edu/~casado/of-­‐sw.html  

83  

Page 84: OpenFlowTutorial ONS Heller

Related  Research  •  DIFANE  

–  Rule  par\\oning  for  controller-­‐less  flow  inser\on  •  UCSD  Fat  Tree  Series:  Scalable  Commodity  Data  Center,  PortLand,  Hedera  –  Scale-­‐out  data  centers  that  use  OpenFlow  

•  Tesseract  –  Centralized  WAN  in  the  4D  Architecture  

•  ONIX  –  Fault-­‐tolerant  controller  plaGorm  from  Nicira,  Google,  NEC  

•  DevoFlow  –  Prac\cal  scalability  limits  to  OpenFlow  and  modifica\ons  to  get  around  them   84  

Page 85: OpenFlowTutorial ONS Heller

Related  Research  •  Frene\c/Ne]le  

–  Func\onal  Reac\ve  Programming  for  more  composable,  reusable  controller  code  

•  Resonance  –  State-­‐machine-­‐based  network  control  

•  Consistency  Primi\ves  – Per-­‐packet  or  per-­‐flow  rou\ng  guarantees  to  simplify  network  versioning  

85  

Page 86: OpenFlowTutorial ONS Heller

Up  Next:  

•  Come  back  at  10:45  for:  “The  SDN  Stack  Part  2:    Virtualiza\on  and  SDN  Applica\ons”  

86  

Page 87: OpenFlowTutorial ONS Heller

Ge#ng  Started  •  (1)  Copy  to  your  hard  disk  from  a  USB  Key  or  DVD:  

–  Copy  needed  files  (VirtualBox,  terminal,  possibly  an  X  server)  for  your  plaGorm  (Win/Mac/Linux)  

–  Copy  Java  6  and  Eclipse  for  your  plaGorm,  if  you  want  to  use  Java  –  Copy  VM  image:  OpenFlowTutorial-­‐101311.zip  –  Pass  on  the  DVD  or  USB  key  to  someone  else!  

•  (2)  Unzip  OpenFlowTutorial-­‐101311.zip  

•  (3)  Point  browser  to  instruc\ons:  –  h]p://www.openflow.org/wk/index.php/OpenFlow_Tutorial  

(note  the  underscore)  

•  You  should  NOT  need  to  download  any  large  files  –  spare  the  WiFi!  

87  

Page 88: OpenFlowTutorial ONS Heller

Virtualiza\on  and  SDN  

Applica\ons  88  

Page 89: OpenFlowTutorial ONS Heller

Virtualiza\on  

Rob  Sherwood,  (BigSwitch)  

89  

Page 90: OpenFlowTutorial ONS Heller

Current  Trials  •  68  trials/deployments  spanning  13  countries  

90  

Page 91: OpenFlowTutorial ONS Heller

Internet2  OpenFlow  deployment  ini\a\ve.    35+  100G  POPs,  na\onwide.  

Page 92: OpenFlowTutorial ONS Heller

Applica\ons  of  SDN  

92  

Page 93: OpenFlowTutorial ONS Heller

OpenFlow  Demonstra\on  Overview  

Network Virtualization FlowVisor

Hardware Prototyping OpenPipes

Load Balancing PlugNServe Energy Savings ElasticTree

Mobility MobileVMs Traffic Engineering Aggregation

Wireless Video OpenRoads

Topic   Demo  

93  

Page 94: OpenFlowTutorial ONS Heller

Demo  Infrastructure  with  Slicing  

Flows

OpenFlow switches

WiMax

Packet processors

WiFi APs

94  

Page 95: OpenFlowTutorial ONS Heller

FlowVisor  Creates  Virtual  Networks  

OpenFlow Switch

OpenFlow Switch

OpenFlow Switch

OpenFlow  Protocol  

FlowVisor  

OpenPipes  Demo  

OpenRoads  Demo  

OpenFlow  Protocol  

PlugNServe  Load-­‐balancer  

OpenPipes  Policy  

FlowVisor  slices  OpenFlow  networks,  crea\ng  mul\ple  isolated  and  programmable  logical  networks  on  the  same  physical  topology.  

Each  demo  presented  here  runs  in  an  isolated  slice  of  Stanford’s  produc\on  network.  

95  

Page 96: OpenFlowTutorial ONS Heller

• Plumbing  with  OpenFlow  to  build  hardware  systems  OpenPipes  

Partition hardware designs

Test Mix resources

96  

Page 97: OpenFlowTutorial ONS Heller

Goal:  Load-­‐balancing  requests  in  unstructured  networks  

Plug-­‐n-­‐Serve:    Load-­‐Balancing  Web  Traffic  using  OpenFlow  

OpenFlow  means…  

   Complete  control  over  traffic  within  the  network   Visibility  into  network  condi\ons   Ability  to  use  exis\ng  commodity  hardware  

What  we  are  showing  

   OpenFlow-­‐based  distributed  load-­‐balancer   Smart  load-­‐balancing  based  on  network  and  server  load   Allows  incremental  deployment  of  addi\onal  resources  

This  demo  runs  on  top  of  the  FlowVisor,  sharing  the  same  physical  network  with  other  experiments  and  produc.on  traffic.   97  

Page 98: OpenFlowTutorial ONS Heller

Dynamic  Flow  Aggrega\on  on  an  OpenFlow  Network  

Scope  • Different  Networks  want  different  flow  granularity  (ISP,  Backbone,…)  •   Switch  resources  are  limited  (flow  entries,  memory)  •   Network  management  is  hard  •   Current  Solu\ons  :  MPLS,  IP  aggrega\on  

How  OpenFlow  Helps?  • Dynamically  define  flow  granularity  by  wildcarding  arbitrary  header  fields  • Granularity  is  on  the  switch  flow  entries,  no  packet  rewrite  or  encapsula\on  • Create  meaningful  bundles  and  manage  them  using  your  own  soyware  (reroute,  monitor)                              Higher  Flexibility,  Be[er  Control,  Easier  Management,  ExperimentaEon  

98  

Page 99: OpenFlowTutorial ONS Heller

Elas\cTree:    Reducing  Energy  in  Data  Center  Networks  

•  The  demo:  

•  Hardware-­‐based  16-­‐node  Fat  Tree  

•  Your  choice  of  traffic  pa]ern,  bandwidth,  op\miza\on  strategy  

•  Graph  shows  live  power  and  latency  varia\on  

•  Shuts  off  links  and  switches  to  reduce  data  center  power  •  Choice  of  op\mizers  to  balance  power,  fault  tolerance,  and  BW  •  OpenFlow  provides  network  routes  and  port  sta\s\cs  

demo  credits:  Brandon  Heller,  Srini  Seetharaman,  Yiannis  Yiakoumis,  David  Underhill  99  

Page 100: OpenFlowTutorial ONS Heller

100  

Page 101: OpenFlowTutorial ONS Heller

Intercon\nental  VM  Migra\on  

Moved  a  VM  from  Stanford  to  Japan  without  changing  its  IP.      

VM  hosted  a  video  game  server  with  ac\ve  network  connec\ons.     101  

Page 102: OpenFlowTutorial ONS Heller

102  

openflow.org/videos  

Page 103: OpenFlowTutorial ONS Heller

Play  Videos:  Wireless  Handover  Load  balancing  

103  

Page 104: OpenFlowTutorial ONS Heller

Times  are  changing  

•  No  longer  “what  can  I  now  do  that  I  couldn’t  do  before”  

•  Clouds  •  Cost  efficiency  

•  Manageability  

•  Programmability  

104  

Page 105: OpenFlowTutorial ONS Heller

Where  SDN  make  sense  (and  doesn’t)  

So  the  ques\on  really  boils  down  to  whether  the  algorithm  needed  to  compute  the  datapath  state  is  easily  distributed  ...  if  the  state  management  algorithm  has  any  of  the  following  proper\es  it  probably  isn’t,  and  is  therefore  a  poten\al  candidate  for  SDN.  

•  It  is  not  amenable  to  being  split  up  into  many  smaller  pieces  (as  opposed  to  fewer,  larger  instances).  The  limi\ng  property  in  these  cases  is  oyen  excessive  communica\on  overhead  between  the  control  nodes.  

•  It  is  not  amenable  to  running  on  heterogeneous  compute  environments.  For  example  those  with  varying  processor  speeds  and  available  memory.  

105  

[from Martin Casado’s blog: http://networkheresy.wordpress.com/2011/11/17/is-openflowsdn-good-at-forwarding/]

Page 106: OpenFlowTutorial ONS Heller

Where  SDN  make  sense  (and  doesn’t)  

•   It  is  not  amenable  to  rela\vely  long  RTT’s  for  communica\on  between  distributed  instances.  In  the  purely  distributed  case,  the  upper  bound  for  communica\ng  between  any  two  nodes  scales  linearly  with  the  longest  loop  free  path.  

•  The  algorithm  requires  sophis\cated  distributed  coordina\on  between  instances  (for  example  distributed  locking  or  leader  elec\on)  

106  

[from Martin Casado’s blog: http://networkheresy.wordpress.com/2011/11/17/is-openflowsdn-good-at-forwarding/]

Page 107: OpenFlowTutorial ONS Heller

SDN  stack  

•  Monitoring/Debugging  Tools  •  Applica\ons  •  Controllers  •  Virtualiza\on  •  Switches  •  Topology  

107  

Page 108: OpenFlowTutorial ONS Heller

Up  Next:  

1:00  -­‐  3:00pm    Controllers:    •  NOX/POX  (Murphy)  

•  Trema  (Hideyuki)  

•  Beacon  (David)  •  Floodlight  (Rob)  •  RouteFlow  (video)  •  +  more  Q&A  

108  

Page 109: OpenFlowTutorial ONS Heller

Q  &  A  

109  

Page 110: OpenFlowTutorial ONS Heller

Ge#ng  Started  •  (1)  Copy  to  your  hard  disk  from  a  USB  Key  or  DVD:  

–  Copy  needed  files  (VirtualBox,  terminal,  possibly  an  X  server)  for  your  plaGorm  (Win/Mac/Linux)  

–  Copy  Java  6  and  Eclipse  for  your  plaGorm,  if  you  want  to  use  Java  –  Copy  VM  image:  OpenFlowTutorial-­‐101311.zip  –  Pass  on  the  DVD  or  USB  key  to  someone  else!  

•  (2)  Unzip  OpenFlowTutorial-­‐101311.zip  

•  (3)  Point  browser  to  instruc\ons:  –  h]p://www.openflow.org/wk/index.php/OpenFlow_Tutorial  

(note  the  underscore)  

•  You  should  NOT  need  to  download  any  large  files  –  spare  the  WiFi!  

110  

Page 111: OpenFlowTutorial ONS Heller

Break  

•  Come  back  at  1:00  for  Controllers  

111  

Page 112: OpenFlowTutorial ONS Heller

Controllers  

112  

Page 113: OpenFlowTutorial ONS Heller

POX:    Murphy  McCauley  

Beacon:    David  Erickson  

Trema:    Hideyuki  Shimonishi  

Floodlight:      Rob  Sherwood  

113  

Page 114: OpenFlowTutorial ONS Heller

VM  Setup/Overview  

114  

Page 115: OpenFlowTutorial ONS Heller

[Hands-­‐on  Tutorial]  Overview  

115  

Page 116: OpenFlowTutorial ONS Heller

TutorialFlow  

116  

Page 117: OpenFlowTutorial ONS Heller

Stuff  you’ll  use  •  Ref  Controller  /  NOX  /  Beacon  /  Trema  /  Floodlight  

•  Open  vSwitch  •  Mininet  

•  iperf  •  tcpdump  •  Wireshark  

117  

Page 118: OpenFlowTutorial ONS Heller

Tutorial  Setup  

Controller  port6633    c0  

OpenFlow  Switch  s1   dpctl  

(user  space  process)  

h4  10.0.0.4  

h3  10.0.0.3  

h2  10.0.0.2  

virtual  hosts  

OpenFlow  Tutorial  3hosts-­‐1switch  topology  

loopback  (127.0.0.1:6633)  

loopback  (127.0.0.1:6634)  

s1-­‐eth0   s1-­‐eth1   s1-­‐eth2  

h1-­‐eth0   h3-­‐eth0   h4-­‐eth0  

118  

Page 119: OpenFlowTutorial ONS Heller

Pick  a  controller!  

119  

Page 120: OpenFlowTutorial ONS Heller

POX:    Murphy  McCauley  

Beacon:    David  Erickson  

Trema:    Hideyuki  Shimonishi  

Floodlight:      Rob  Sherwood  

120  

Page 121: OpenFlowTutorial ONS Heller

Hands-­‐on  Tutorial  Instruc\ons  at:  www.openflow.org/wk/index.php/OpenFlow_Tutorial  

121  

Page 122: OpenFlowTutorial ONS Heller

Q&A  

122  

Page 123: OpenFlowTutorial ONS Heller

Deployment  

Experiences  123  

Page 124: OpenFlowTutorial ONS Heller

Deployment:  

Srini  Seetharaman  

124  

Page 125: OpenFlowTutorial ONS Heller

Wrap-­‐Up  

125  

Page 126: OpenFlowTutorial ONS Heller

126  

0  

20  

40  

60  

80  

100  

120  

140  

160  

180  

1/1/08   1/1/09   1/1/10   1/1/11   1/1/12  

OpenFlow/SDN  Tutorial  A[endees  

A]endees   Expon.(A]endees)  

Page 127: OpenFlowTutorial ONS Heller

Growing  Community  Vendors and start-ups Providers and business-unit

More... More...

127  Note: Level of interest varies

Page 128: OpenFlowTutorial ONS Heller

Closing  Thoughts  

•  SDN  &  OpenFlow  •  Open  Source  Ecosystem  

•  SDN  Switches  and  Controllers  are  available,  used,  and  improving:  open  &  closed  

•  These  are  the  early  stages  for  SDN  

128  

Page 129: OpenFlowTutorial ONS Heller

Get  involved!  

•  Ask  and  answer  ques\ons  on  mailing  lists:    – openflow-­‐discuss  – openvswitch-­‐{discuss/dev}  – ONF  forums  

•  Share  via  wiki,  github,  etc.  •  Submit  bug-­‐reports  and/or  patches  to  OF  reference  implementa\on  and  Open  vSwitch  

•  Release  open-­‐source  applica\ons  •  Write  a  new  controller!  

129  

Page 130: OpenFlowTutorial ONS Heller

This  tutorial  wouldn’t  be  possible  without:  

•  Speakers  – Rob  Sherwood  – David  Erickson  – HIDEyuki  Shimonishi  – Murphy  McCauley  

– Srini  Seetharaman  

130  

Page 131: OpenFlowTutorial ONS Heller

ACKs  (acknowledgements)  

131  

Page 132: OpenFlowTutorial ONS Heller

This  tutorial  wouldn’t  be  possible  without:  

•  OpenFlow  Experts  –  Tatsuya  Yabe  –  Nikhil  Handigol  –  TY  Huang  –  James  Hongyi  Zeng  

–  Bob  Lantz  – Masahiko  Takahashi  

–  Ali  Al-­‐Shabibi  –  Ali  Yahya  –  Glen  Gibb  

132  

Page 133: OpenFlowTutorial ONS Heller

This  tutorial  wouldn’t  be  possible  without:  

•  Past  slides  from:  –  Nick  McKeown  –  Rob  Sherwood  –  Guru  Parulkar  –  Srini  Seetharaman  

–  Yiannis  Yiakoumis  –  Guido  Appenzeller  – Masa  Kobayashi  

–  Sco]  Shenker  –  others  

133  

Page 134: OpenFlowTutorial ONS Heller

This  tutorial  wouldn’t  be  possible  without:  

•  Behind-­‐the-­‐scenes  organizers:  –  Flora  Freitas  –  Asena  Gencel  –  Guru  Parulkar  

134  

Page 135: OpenFlowTutorial ONS Heller

SDN  Team  at  Stanford