Ryu: network operating system


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Ryu: network operating system

  1. 1. Ryu: Network Operating System Kazutaka MoritaNTT Software Innovation CenterIsaku YamahataVA LinuxJune 6, 2012
  2. 2. Agenda ²  Overview²  How it works²  Demo²  Summary 2 
  3. 3. Overview
  4. 4. What is Ryu? ²  Open-sourced network operating system ³  Network operating system ®  Programmatic network control interface ®  Logically centralized controller for thousands of switches (OVS, openflow switch) ³  Open source software (Apache v2) ®  Fully written in Python ®  Project site: http://www.osrg.net/ryu/²  Ryu stands for ³  流 - Means “flow” in Japanese ³  龍 - Means “Japanese dragon”, one of water gods 4 
  5. 5. Overview Ryu network controllers RESTful app app app management API Programmatic network Administrator control interface・ We can implement network management applications on top of Logically centralized the Ryu controller ・ Decouples virtual networks from the physical network ・Supports OpenFlow 1.0 (including Nicira Extension) ovs Openflow switch ovs Openflow switch 5 
  6. 6. Goals ²  De facto OSS network operating system²  High quality enough for use in large production environment ³  Code quality ³  Functionality ³  Usability²  Become the standard network controller of cloud software (e.g. OpenStack) ³  Ryu plugin is merged into OpenStack Essex²  Default Controller for fedora/debian/ ubuntu 6 
  7. 7. What does Ryu provide? ²  Ryu applications ³  GRE tunneling ³  VLAN support ³  Topology discovery ³  MAC based segregation²  We can use these features with only commodity hardware 7 
  8. 8. How it works
  9. 9. Integrate with OpenStack ²  OpenStack ³  Open source software for building private and public clouds²  What does Ryu bring to OpenStack? ³  Flat L2 networks regardless of the underlying physical network ³  Scalable multi-tenant isolations ®  Ryu provides tunneling based isolations ®  VLAN doesn’t scale larger than 4096 ®  We don’t need high-end switches 9 
  10. 10. OpenStack ²  Nova: cloud management system ³  Nova compute node ®  Physical machine that runs guest VM instances ³  Nova network node ®  Physical machine that runs networks gateway to the outside network²  Quantum: network management system ³  Quantum server ®  Manages network configuration ®  Nova requests quantum-server for network configuration ³  Quantum agent ®  It runs on nova compute/network node ³  Quantum plugin ®  Plugin for each network technology ®  Ryu plugin 10 
  11. 11. How Ryu works with OpenStack Quantum-­‐node:  somewhere  where   compute/network  can  communicate.   Ryu-­‐node:  somewhere  where   Typically  on  network-­‐node   compute/network/quantum  can  communicate   Typically  on  network-­‐node   Quantum  db:   Ryu  db  (in  memory)    (datapath  id,  Tunnel  ip)   (Tenant  id,  tunnel  id)    (network  uuid,  tunnel  key)   (dpid,  port,  tenant  id,  mac  addr)   REST  API   (dpid,  port,  remote_dpid)   Quantum   server   Ryu  Quantum   DB   OpenFlow  API   access   Vif  driver   Ryu  agent   OVS   linux_net  driver   Ryu  agent   OVS   Create   Create   Tap  port   Tunnel  port   compute-­‐node   Network-­‐node  
  12. 12. Demo
  13. 13. Ryu demo (GRE tunneling) ping ping ping ping ping ping Linux Linux Linux Linux Linux Linux Qemu/KVM Qemu/KVM Qemu/KVM Qemu/KVM Qemu/KVM Qemu/KVM ryu Nova OVS compute OVS Nova OVS NovaQuantum compute compute server Quantum agent Nova Quantum Quantumnetwork Openstack Linux agent Linux agent Linux servers KVM KVM KVM GRE tunnel GRE tunnel GRE tunnel bridgeLinux (phyisical machine) 13 
  14. 14. Ryu demo (GRE tunneling) Host  1 Tenant A Tenant A Tenant B Tenant A ID -> 3 VM 1 VM 2 VM 1 Tenant B ID -> 4 GRE tunnel 1-3 Host 3 OVS 1 Tenant A Tenant B Tenant B VM 4 VM 4 VM 5 GRE tunnel 1-2 OVS 3 Host 2 Tenant A Tenant B Tenant B GRE tunnel 2-3 VM 3 VM 2 VM 3 OVS 2 14 
  15. 15. Summary
  16. 16. Future items ²  Integration with Quantum IPAM and L3 API²  Firewall²  Virtual network to physical network, and vice versa ³  Convert among GRE key, VLAN tag, …²  Distributed controllers ³  No single point of failure ³  Datacenter-wide scalability 16 
  17. 17. Summary ²  Ryu is an open-sourced network operating system licensed under Apache License v2. ³  Site: http://www.osrg.net/ryu/ ³  ML: ryu-devel@lists.sourceforge.net²  Set up Ryu environment with VM images ³  https://github.com/osrg/ryu/wiki/RYU- OpenStack-environment-VM-image-file- HOWTO 17 
  18. 18. Thank you! Any questions? 18 
  19. 19. Appendix
  20. 20. Block diagram of Ryu ... RyuApp GREtunnel RyuApp Discovery RyuApp VLAN REST API Higher level event Switch management/OFP event Storage RyuApp HTTP server Memory magement (WSGI)Openflow protocol Event queue/dispatcherParser/serializer 20 
  21. 21. OpenStack basics ²  OpenStack ³  Nova: cloud management system ³  Quantum: network management system²  Nova compute node ³  Physical machine that runs guest VM instances²  Nova network node ³  Physical machine that runs networks gateway to the outside network²  Quantum server ³  Manages network configuration ³  Nova requests quantum-server for network configuration²  Quantum agent ³  It runs on nova compute/network node²  Quantum plugin ³  Plugin for each network technology ³  Ryu plugin 21 
  22. 22. GRE tunneling with openstackl  Network Tenant creation l  GRE key assignment l  Gateway creationl  Guest VM instance creation l  Port creation -  tenant ↔ key ↔ port relationship l  Setting flow to the VM portl  Tunnel port management l  Tunnel port creation/deletion -  Track physical compute node l  Setting flow to the tunnel port
  23. 23. Quantum  db:   Ryu  db  (in  memory)   Quantum   (Tenant  id,  tunnel  id)    (datapath  id,  Tunnel  ip)   server   (dpid,  port,  tenant  id,  mac  addr)   Network  id(uuid)  creation/deletionq   On  vm  creation:  port  uuid,  mac  address   (dpid,  port,  local_ip,  remote_ip)   Tunnel  id   VM  Port:  (dpid,  Tenant  uuid,  mac  addr)   Tunnel  port:  (dpid,  local_ip,  remote_ip)   Data`low  The  Agent  polls  db:   Ryu      Create  vport-­‐gre   (tenant  uuid,   tunnel_id)   (tenant,      Update  port  status   tunnel)   vm  port(dpid,   tenant  uuid,  mac  addr)   Ryu  agent   OVS   Vif  driver   OVS   Vif  driver   vport-­‐gre:   Ryu  agent   remote_ip=xxx,   local_ip=yyy,   Vif  driver  creates  vm  port   Gw  port(dpid,   (tenant  uuid,   key=0   Tenant  uuid,  mac  addr)   tunnel_id)   OVS   linux_net  driver   Vif  driver   OVS   Ryu  agent   Ryu  agent   Linux_net  driver  creates  gw  ports  
  24. 24. Network Creation 8  (network_id,  dpid,  port,  mac)   Quantum   server   Ryu  7.     3.  Network  uuid,Tunnel  key  (tenant_id,  network_id,  dpid,   9.  set  `low  entryies  Port,   2.  Create  net  mac)   4.  uuid   nova-­‐network   1.  create  network   5.plug   6.  Create  gw-­‐xxx   OVS   linux_net  driver   Network-­‐node  
  25. 25. Instance Creation 6.     7.  (network_id,  dpid,  port,  mac)   (tenant_id,   network_id,   Quantum   server   Ryu   dpid,   Port,   mac)   8.  set  `low  entryies   3.  uuid   2.  Create  port   nova-­‐compute  1.  create  instance   4.plug   5.  Create  tap-­‐xxx   OVS   vif  driver   compute-­‐node  
  26. 26. Node boot up Quantum   Ryu   Quantum  db   server   2.  Register   3.  Get  list  of   (dpid,  ipaddress)   5.  register   (dpid,  ip  address)   (and  polling)   (dpid,  port-­‐id,  remote_dpid)  4.  Create  vport-­‐gre   Ryu  agent  to  ip  address   1.  Get  IP  address   OVS   ryu_v2.ini   Compute/Network-­‐node  
  27. 27. Flow Table Usage Src  table   Tunnel  out   Local  out   In  port   Table  0   Table  1   Table  2   match   action   match   action   match   action   in_port   set_tunnel   tunnel_id   output(tunnel)   src  mac   goto  table  1   dst  mac   goto  table  2  VM  port   in_port   drop   tunnel_id   goto  table  2   tunnel_id   output(vm)   dst  mac  Tunnel   in_port   goto  table  2   tunnel_id   drop  port   tunnel_id   in_port   drop   VM1   GRE  tunnel   OVS   tunnel   VM2   port   VM  port