This tutorial based on the Ryu SDN controller was given at the COST ACROSS Summer School 2015 at the University of Würzburg, Germany.
The tutorial included implementation of two controller apps:
- ryu.app.learningswitch: A simple Layer 2 switch implementation.
- ryu.app.shortestpath a more sophisticated implementation using networkx to compute shortest path also through a topology consisting of loops.
The virtual machine used in the tutorial (based on the work of SDN Hub) can be downloaded here.
The scripts ./run_mininet1.sh
(1 switch for the learning switch scenario)and ./run_mininet4.py
(4 meshed switches for the shortest path scenario) can be used to connect hosts and switches to the controller.
Ryu is a component-based software defined networking framework.
Ryu provides software components with well defined API that make it easy for developers to create new network management and control applications. Ryu supports various protocols for managing network devices, such as OpenFlow, Netconf, OF-config, etc. About OpenFlow, Ryu supports fully 1.0, 1.2, 1.3, 1.4 and Nicira Extensions.
All of the code is freely available under the Apache 2.0 license. Ryu is fully written in Python.
Installing Ryu is quite easy:
% pip install ryu
If you prefer to install Ryu from the source code:
% git clone git://github.com/osrg/ryu.git % cd ryu; python ./setup.py install
If you want to use Ryu with OpenStack, please refer networking-ofagent project.
If you want to write your Ryu application, have a look at Writing ryu application document. After writing your application, just type:
% ryu-manager yourapp.py
Some functionalities of ryu requires extra packages:
- OF-Config requires lxml
- NETCONF requires paramiko
- BGP speaker (net_cntl) requires paramiko
If you want to use the functionalities, please install requirements:
% pip install lxml % pip install paramiko
Ryu Official site is http://osrg.github.io/ryu/.
If you have any questions, suggestions, and patches, the mailing list is available at ryu-devel ML. The ML archive at Gmane is also available.