Tools for OF-DPA 2.0 & Ryu Controller

Utility Functions: Changing Port Configuration

When writing Ryu applications, you can often find yourself repeatedly looking up multiple reference guides to find appropriate bitmasks and flag names even when doing something as simple as configuring a port. Following up on my previous Quick Tip, here we have a couple of utility functions that you can use to easily bring ports up and down inside a Ryu app itself. This is just a simple example, but it demonstrates that it is often a good idea to write your own utility functions that you may use in several places. This not only make your code cleaner and easier to read, but also save time in the future by not having to repeat previous work.

Subscribing to Port Events

When writing controller applications, it is often useful to determine when a port status changes. For example, when a port’s physical link is removed, flows and internal tables may need to be modified as part of a network layout learning algorithm. Thankfully, subscribing to these events is quite simple.

Using Postman to Probe Ryu REST API

Postman is a tool that we use extensively to access the Ryu REST API ( It has been an indispensable component of our development tool chain.

Postman, a Chrome-based application (either as a Chrome App or a standalone application), is a web browser technology that simplifies accessing the the Ryu REST API by providing an environment to craft, send HTTP requests and receive replays. Postman is especially helpful in working with the long JSON structures required by the Ryu REST API to query OpenFlow switches.


Signup for our Newsletter!