2. whoami
❖ 林哲緯 ( John-Lin )
❖ 清華⼤大學 通訊⼯工程所 HSNL LAB
❖ 背景是通訊⼯工程
• 原是寫 Python 當興趣,玩網路程式時接觸
SDN/OpenFlow
❖ ⽬目前研究使⽤用 Ryu 未來應該也會繼續⽤用 Ryu Controller
❖ Network Security in SDN
• Contribute Snort-Integrate patch in Ryu
• See more: http://linton.tw/2014/09/03/Ryu-with-Snort-Integration/
3. Outline
❖ OpenFlow Overview
❖ Introduction to Ryu application development
❖ The OpenFlow API in Ryu
❖ Demo
4. Outline
❖ OpenFlow Overview
❖ Introduction to Ryu application development
❖ The OpenFlow API in Ryu
❖ Demo
5. What is OpenFlow?
Controller Plane
OpenFlow Controller
OpenFlow Protocol (SSL/TCP)
Flow Table
Packet Packet
OpenFlow Switch
Data Plane
Forwarding
Drop
Forward to Controller
6. About Flow Entry
Rule Action Statistics
in_port
VLAN
ID
VLAN
pcp
1. Forward packet to ports
2. Forward to controller
3. Drop packet
4. Modify Field (set-field)
MAC
src
MAC
dst
Eth
type
1. Packet counter
2. Byte counter
IP src IP dst IP ToS sport dport
More match field: http://ryu.readthedocs.org/en/latest/ofproto_v1_3_ref.html?highlight=match#ryu.ofproto.ofproto_v1_3_parser.OFPMatch
10. The messages between Controller and switch
❖ Controller-to-Switch Messages (Controller->Switch)
❖ Features
❖ Modify-State
❖ Packet-out
❖ Configuration, Read-State, Barrier, Role-Request, Asynchronous-Configuration
❖ Asynchronous Messages (Switch->Controller)
❖ Packet-In
❖ Flow Removed
❖ Port Status
❖ Error
❖ Symmetric Messages (Switch<->Controller)
❖ Hello
❖ Echo Request / Reply
❖ Experimenter
OpenFlow Controller
OpenFlow Protocol
Flow Table
OpenFlow Switch
11. Outline
❖ OpenFlow Overview
❖ Introduction to Ryu application development
❖ The OpenFlow API in Ryu
❖ Demo
12. What is Ryu
❖ Ryu is a component-based software defined networking
framework.
❖ Fully written in Python
❖ Ryu supports various protocols for managing network
devices
• OpenFlow 1.0, 1.2, 1.3, 1.4, Netconf, OF-config
❖ License: Apache 2.0
15. Installation
❖ On Official site…
❖ Notice: Before you Install, check the dependencies first.
16. Automatic Installation Script
❖ On Ubuntu 12.04+, two-line command can install Ryu
3.14
❖ This helper script which should get all dependencies
and download, build, and install Ryu.
Fork me on: https://github.com/John-Lin/ryuInstallHelper