Flowgrammable as a Tool for Learning OpenFlow Concepts and Programming

Wendell Odom
By Wendell Odom August 27, 2015 09:05

At first glance, the Flowgrammable web site looks like a toolbox of tools you collected over time. All those tools have something to do with helping us all towards an SDN world. Two of those tools in particular can help you learn about SDN, particularly about how OpenFlow works, and that’s exactly the kind of topic I look to post about here – so today’s post takes a closer look at what’s available at the Flowgrammable site.

Quick Overview of Flowgrammable

The first sentence of the Flowgrammable web site’s About page both confirms why the content may appear to be a mash of topics, but why it all the topics have a common theme:

Flowgrammable.org is a coalition of researchers and industry engineers dedicated to improving adoption of software-defined networks and networking.

Basically, they’re trying to help us all get there, to an SDN world, in the ways that they can help.

I talked to 5-6 of the Flowgrammable team at ONS in June and learned about their site. As for the people, many are grad students that have worked together to develop the tools shown on the site.

For this post, I’ll mention two of their tools, and focus on one the second one just to keep the length of the post manageable.

 

A Quick Word about The OpenFlow Simulator

First, Flowgrammable.org offers a free OpenFlow simulator. However, resist the urge to immediately think “Mininet” – it’s definitely not. This simulator fills some very specific needs, to help people understand the OpenFlow protocol, mechanics, and switch internals.

In you ever wondered about thoughts like this, the FlowSim simulator can be a help to you:

  • I want to understand OpenFlow protocols well.
  • I want to understand the internals of OpenFlow switches – what really happens in there?
  • What’s all this stuff about using multiple tables, and how does a switch use those tables?
  • I want to learn by doing rather than just reading.
  • But could I really learn OpenFlow well without writing code? That would be great!
  • I want a way to just add flows to a switch, watch it forward packets, and see a visualization of what happens inside the switch.

Do any of those apply to you? Try FlowSim. I’ll save more for a later post (and after I get some more practice!)

 

The OpenFlow Message Layer Reference Pages

The second Flowgrammable tool for this post gives us all a very useful OpenFlow reference called the OpenFlow Message Layer.

Do you plan to read the OpenFlow specs, understand it all, master it, and never forget it? Then you can stop reading now, because you don’t need this tool. For the rest of us who may not memorize every detail, the OpenFlow Message Layer reference at the Flowgrammable web site can be a useful help. Any time you need to remember something, or dig a little deeper into the OpenFlow protocol, this site can be a big help.

 

Use it as an Intermediate-term Reference, or Beginning Learning Tool

These pages are not so much of a getting started guide as a reference for those who understand some of the big ideas about OpenFlow already. However, I believe the site can be useful for learning, even for learning the basics. Certainly, the more you get into OpenFlow, the more useful the site is.

For those of you just getting into OpenFlow, or wanting to go a little deeper, consider: how have you (or how will you) go about learning OpenFlow? Did you:

  • Open a book that you bought, read it, and highlight it
  • Look at the PDFs of the specs from opennetworking.org
  • Look at your highlighted printed copies of those same specs
  • Take a class that required some programming using OpenFlow

 

Figure 1: Typical Sources to First Learn OpenFlow

 

All those are reasonable and important steps to go from knowing little to learning OpenFlow to some depth. However, once you’ve made that bit of headway, you’ve probably got a scattered set of notes from all those sources. The OpenFlow Message Layer pages help solve that problem.

The OpenFlow Message Layer reference pulls all those notes together, and more, and a very handy web site. First, it includes a reference for all the early OpenFlow versions. From clicking around, it looks like thorough support up through OpenFlow 1.3.1, and some coverage of different messages through 1.4.0. (I’m sure that line will change over time as they make headway on adding more pages.)

Point is that with most switches supporting 1.0 and 1.3, the reference is plenty useful for the real world.

The pages are part protocol reference, but it works almost like an API document as well. You can:

  • Quickly find the OpenFlow messages
  • Quickly find other standard data structures, like the match field
  • Easily move between pages for the message at different OpenFlow versions to see differences
  • See a consistent graphical view of each message format across OpenFlow versions

 

A Brief Peek at the Good Stuff in the OpenFlow Protocol Reference

Just a quick look at a few pages can show you how useful the pages can be. This next figure is an image from the top of the page for the OpenFlow StatsRequest message for version 1.3.1:

Figure 2: An Excerpt from Flowgrammable.com OpenFlow Message Reference

 

Note that the page (list all the pages I’ve visited) gives the structure of the message, which can be useful no matter what programming language you happen to be using. Second, it tells us what’s changed from version to version. A programmer can easily navigate from 1.0 up through every version, see what has changed, what has not, and get a good sense of the task ahead.

The figure does not show it all, so click the link and look further down the page. Note all the depth further in the page – each page shows the details of the data structures in the message. It’s a one-stop shop for all your OpenFlow protocol reference needs.

 

Thinking “I’ll Never Get that Deep?” Spend 15 Minutes There, Like This

If you look at a few of these pages, or even the bits that I’ve written here, you may end up with this overriding thought:

I will NEVER need to know OpenFlow to the depth of needing such a detailed protocol reference.

And you know what? Statistically, I agree. I made a quick graph to make the point – more of us networkers will just need to know the big ideas in OpenFlow, a few more need to know the various protocol flows, and fewer still will need to know the specific message formats and detailed minutia of individual OpenFlow messages.

Figure 3: Guestimate of Relative Numbers of Networkers vs. Depth of OpenFlow Knowledge

 

However, for perspective, think about how you learned traditional networking for a moment. Even if you do not look at Wireshark traces of Ethernet and IPv4 every day, didn’t you at one point learn a little more about those protocols by digging into the message flows, and the specifics of the headers? Didn’t that knowledge help you understand Ethernet and IP better for the ways you do use those protocols in your job, even if you didn’t think about the protocols in depth every day?

That same idea – to benefit from learning the protocol a little more deeply – applies to OpenFlow. And Flowgrammable OpenFlow Message Layer can be a place to learn that, just a few minutes at a time.

 

A Quick Beginner-Oriented OpenFlow Learning Exercise

So if you ever have 10-15 minutes and want to review or learn something quickly, pop over to the Flowgrammable site, and try this process:

  1. Pick any OpenFlow message that you have heard about before. (I have suggestions below.)
  2. Read the pages from the OpenFlow Message Layer, from version 1.0 upward, about that message.
  3. Do not worry about memorizing where fields sit – just worry about the fields and what they mean.
  4. Pay close attention to what changed over time with each version, because that tells you what the ONF thought needed to be added to OpenFlow.
  5. Pay close attention to comparing OF 1.0 vs 1.3, which are the most commonly implemented versions you would see today.

The above process, which you can do from anywhere, lets you review what you learned from your earlier study (as in Figure 1.) If you do not know where to start, here are a few ideas that can reveal (or review) a few quick insights about OpenFlow:

  • Look at the Hello message through it’s various versions, starting at 1.0. (The Hello message flows just after TCP connection setup between a switch and controller.) You’ll see that at some point ONF added the details of how switches and controllers can declare and choose the best OpenFlow version to use.
  • Next, look at the PacketIn message, again comparing version 1.0 through later versions. Switches use this message to forward a copy of received messages to the controller, for a variety of reasons, particularly if the switch has no matching entry in its OpenFlow table. For simplicity’s sake for this exercise, pay close attention to the “reason” field, which starts with two reasons in OF 1.0, and adds a 3rd reason (TTL) as some point in the history of OpenFlow.
  • When you first scratch the surface of SDN with OpenFlow, you might think that the switch has no configuration at all. However, the OpenFlow SetConfig message allows for the setting of some per-port config options, which can be particularly interesting for traditional networkers who are just learning about OpenFlow. The OpenFlow Message Layer tool helps quite a bit here, showing a couple of transitions in the name of the message – a fact that might make finding the right tidbit in a book or other reference a little more challenging.
  • Look at the FlowMod message for sure. This is the message that the controller uses to program or change flows in a switch. Of particular note, as you work through the versions: Note that all versions of this message have a match field listed, and both an idle and hard timeout. Note the addition of a table ID field at version 1.1 (which added support for multiple tables.) And note that all versions include a priority field, which lets the controller tell the switch which flow to use if multiple flows match a single message.
  • Finally, check out the match field page. Note that in the FlowMod message pages, throughout the different versions, the match field did not change. However, one of the first things you learn even when reading a book with just a few pages about OpenFlow is that OpenFlow has added to the list of matchable fields at each version over time. To see those in the Flowgrammable OpenFlow Message Reference, you go to a separate page about the match data structure. And it’s a great reference – check it out.

 

One Brief Tangent – ONF Certs Vis-a-Vis This Topic

The ONF announced details of their certification program in July 2015. Of interest relative to this post, note that both of the two initial ONF certifications requires OpenFlow skills. The more basic certification, the ONF Certified SDN Associate (CSDNA), appears to be more about protocol flows and functions, but not into the details of the messages themselves. (That is, CSDNA appears to require skills like the 2nd column of Figure 3.) The ONF Certified SDN Professional (CSDNP) cert appears to move into some detail of the specific messages (more like the 3rd paragraph of that earlier chart). So this resource from Flowgrammable will be of good service to those studying for either of the ONF certifications as well.

ONSCerts-both-W150

 

I’m a Fan, Even Though I’m on the Left Side of that Graph!

So that’s a brief introduction to some of the useful OpenFlow tools for programmers and for learners at the Flowgrammable.org web site. I’m and fan now, even though I don’t live daily in the details of OpenFlow. Some reasons:

  • Visuals of the messages in the OpenFlow Message Reference just work much better for learning the basics as compared to lots of text in the ONF standards docs.
  • The comments in the OpenFlow Message Reference about what has changed from version to version can be a huge help to programmers as SDN matures and more and more apps need to be migrated.
  • You can find all the details, quickly and easily, and it’s communicated clearly as well.

 

 

Top 3 Labs for Networkers to Get Started at Cisco’s DevNet
ONF Announces SDN Certification Specifications
Wendell Odom
By Wendell Odom August 27, 2015 09:05
Write a comment

No Comments

No Comments Yet!

Let me tell You a sad story ! There are no comments yet, but You can be first one to comment this article.

Write a comment
View comments

Write a comment

Your e-mail address will not be published.
Required fields are marked*

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Search

Categories