Summary of Ryu controller code structure

Source: Internet
Author: User
1. Basic Framework and Development instructions of Ryu


From the framework, we can see that in the Ryu controller architecture, including non-of protocols, of protocols, various libraries, and embedded apps, the Ryu Controller provides a unified rest API for users to develop their own apps Based on the Ryu framework. At the same time, developers can develop their own apps based on their own needs. Add the required components and library files. It is worth noting that the Ryu architecture only provides developers with a platform, which is equivalent to an operating system without application software. Developers want to implement their desired functions based on this framework, you must use the APIS provided by Ryu to write apps with corresponding functions. These apps are equivalent to the applications of our operating system.


2. Ryu code structure
The code for implementing the main functions of the Ryu controller is put in/Ryu/folder (in my Linux system, put ~ /Home/Simon/Ryu/). To get familiar with Ryu as soon as possible, we first get familiar with the role of the main function components of Ryu:
  • APP /-Applications running on the Ryu controller perform specific functions based on the controller.
  • Base /-Provides the necessary base classes for the normal operation of Ryu apps. The ryuapp class in the app_manager.py folder is very important. Every time you create a new app, you must inherit this class.
  • Controller /-This file contains a series of files that process the openflow function. For example, data packets from vswitches generate flows, process network events, summarize status information, and other data processing related to openflow.
  • LIB /-It includes a series of protocol packages used to analyze headers of different protocol packages and a library dedicated to the ofconfig protocol. In addition, it also includes the analysis of NetFlow and sFlow analyzer. Note that here we only analyze each Protocol packet, that is, we can identify and analyze the information contained in the packet header, there is no data packet processing capability. If you want to connect different protocols and process protocol data packets, you must create corresponding components or apps.
  • Ofproto /-Including the version information of openflow protocol and analysis modules related to openflow protocols of different versions (of 1.0 1.2 1.3)
  • Topology /-Includes the topology discovery Code related to openflow switches and the processing of topology discovery information (such as ports and links ). The lldp protocol is used internally for topology discovery.
3. Ryu controller code Overview
Most controller Platforms provide developers with their own unique features to support the following key features:
  • You can listen to asynchronous events (such as packet_in and flow_removed) and view events registered using Ryu. Controller. handler. set_ev_cls decorator.
  • Data packets that enter the controller can be analyzed (for example, ARP, ICMP, TCP, etc.) and packets sent to the network can be generated.
  • Openflow/SDN information can be generated and sent to the programmable data plane (for example, packet_out, flow_mod, stats_request, etc ).
Thank you for your criticism!

Summary of Ryu controller code structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.