.. _getting_started:
***************
Getting Started
***************
Overview/What's Ryu the Network Operating System
================================================
Ryu is an open-sourced Network Operating System which is licensed under GPL v3.
It supports openflow protocol.
If you are not familiar with Software Defined Network(SDN) and
OpenFlow/openflow controller,
please refer to `openflow org `_ .
The mailing list is available at
`ryu-devel ML `_
Installing Ryu Network Operating System
=======================================
Extract source code and just type::
% python ./setup.py install
Then, run ryu-manager.
It listens to ip address 0.0.0.0 and port 6633 by default.
Then have your openflow switch (hardware or openvswitch OVS) to connect to
ryu-manager.
For OVS case, you can done it by
% ovs-vsctl set-controller tcp:[:]
At the moment, ryu-manager supports only tcp method.
If you want to use it with openstack nova and quantum OVS plugin,
Please refer to :ref:`using_with_openstack`.
invoking application and Configuration
======================================
It can be configured by passing configuration file like::
ryu-manager [--flagfile ] [generic/application specific options...]
At the moment the following applications are available
(And more to come as Ryu evolves.)
* ryu.app.simple_isolation.SimpleIsolation
* ryu.app.rest.restapi
* ryu.app.simple_bridge.SimpleSwitch
* ryu.app.event_dumper.EventDumper
The generic available is as follows::
--app_lists: application module name to run;
repeat this option to specify a list of values
(default: "['ryu.app.simple_isolation.SimpleIsolation',
'ryu.app.rest.restapi']")
-?,--[no]help: show this help
--[no]helpshort: show usage only for this module
--[no]helpxml: like --help, but generates XML output
The options for REST server::
--wsapi_host: webapp listen host
(default: '')
--wsapi_port: webapp listen port
(default: '8080')
(an integer)
The options for openflow controller::
--ofp_listen_host: openflow listen host
(default: '')
--ofp_tcp_listen_port: openflow tcp listen port
(default: '6633')
(an integer)
The options for log::
--default_log_level: default log level
(an integer)
--log_dir: log file directory
--log_file: log file name
--log_file_mode: default log file permission
(default: '0644')
--[no]use_stderr: log to standard error
(default: 'true')
--use_syslog: output to syslog
(default: 'False')
--[no]verbose: show debug output
(default: 'false')
The option for gflags::
--flagfile: Insert flag definitions from the given file into the command line.
(default: '')
--undefok: comma-separated list of flag names that it is okay to specify on
the command line even if the program does not define a flag with that name.
IMPORTANT: flags in this list that have arguments MUST use the --flag=value
format.
(default: '')
The options for event dumper::
--dump_queue: list of dispatcher name to dump event: default any
(default: [])
--dump_dispatcher: list of dispatcher name to dump event: default any
(default: [])
Invoking Example
================
The exmaple is as follows::
$ ./bin/ryu-manager --wsapi_port 8081 --verbose --app_lists ryu.app.simple_isolation.SimpleIsolation,ryu.app.rest.restapi,ryu.app.event_dumper.EventDumper
unhandled event
loading app ryu.app.simple_isolation.SimpleIsolation
loading app ryu.app.rest.restapi
ryu.app.event_dumper: registering q datapath dispatcher dpset
loading app ryu.app.event_dumper.EventDumper
connected socket: address:('172.17.107.1', 41888)
ryu.app.event_dumper: queue created ofp_msg
ryu.app.event_dumper: event
ryu.app.event_dumper: event
hello ev
move onto config mode
dispatcher change q ofp_msg dispatcher ofp_config
ryu.app.event_dumper: dispatcher change q ofp_msg dispatcher ofp_handshake -> ofp_config
ryu.app.event_dumper: event
ryu.app.event_dumper: event
switch features ev version: 0x1 msg_type 0x6 xid 0xd1bf86d2 port OFPPhyPort(port_no=8, hw_addr='b\x9d\xf4\x03\xab\xaf', name='tap5d7657d4-cb\x00\x00', config=0, state=1, curr=130, advertised=0, supported=0, peer=0) OFPPhyPort(port_no=1, hw_addr='\x00\x02\xb3\x13\xea\xd6', name='eth0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', config=0, state=0, curr=520, advertised=1679, supported=655, peer=0) OFPPhyPort(port_no=18, hw_addr='\xce\x12\xa2\x8a\xe5\x1c', name='tapa37f47e1-25\x00\x00', config=0, state=1, curr=130, advertised=0, supported=0, peer=0) OFPPhyPort(port_no=19, hw_addr='\x12\xba1\x7f\xe4\xde', name='tap927b77c7-8f\x00\x00', config=0, state=1, curr=130, advertised=0, supported=0, peer=0) OFPPhyPort(port_no=65534, hw_addr='\x00\x02\xb3\x13\xea\xd6', name='br-int\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', config=1, state=1, curr=0, advertised=0, supported=0, peer=0)
dpid_add: 0x00000002b313ead6
ryu.app.event_dumper: event
barrier reply ev msg version: 0x1 msg_type 0x13 xid 0xd1bf86d5
move onto main mode
dispatcher change q ofp_msg dispatcher ofp_main
DPSET: register datapath
ryu.app.event_dumper: event
unhandled event
ryu.app.event_dumper: dispatcher change q ofp_msg dispatcher ofp_config -> ofp_main
ryu.app.event_dumper: event