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. 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. 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. 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
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. 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. 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
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 Nova
Quantum compute compute
server Quantum
agent
Nova Quantum Quantum
network Openstack Linux agent Linux agent
Linux servers
KVM KVM KVM
GRE tunnel GRE tunnel GRE tunnel
bridge
Linux (phyisical machine) 13
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
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. 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
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. GRE tunneling with openstack
l Network Tenant creation
l GRE key assignment
l Gateway creation
l Guest VM instance creation
l Port creation
- tenant ↔ key ↔ port relationship
l Setting flow to the VM port
l Tunnel port management
l Tunnel port creation/deletion
- Track physical compute node
l Setting flow to the tunnel port
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
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. 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