Setup

In this chapter, we will continue to use the same http://sdnhub.org/ all-in-one virtual machine from the last chapter. The Ryu install on the VM was a few releases behind the current one, so it was fine for a start, but we want to use the latest BGP speaker library and examples for this chapter. The latest version also supports OpenFlow 1.5 if you would like to experiment with it. Therefore, let's download the latest version and install from source:

 $ mkdir ryu_latest
$ cd ryu_latest/
$ git clone https://github.com/osrg/ryu.git
$ cd ryu/
$ sudo python setup.py install

# Verification:

$ ls /usr/local/bin/ryu*
/usr/local/bin/ryu* /usr/local/bin/ryu-manager*
$ ryu-manager --version
ryu-manager 4.13
Officially, Ryu supports Python 3.4 and beyond. It is my opinion that most of the existing applications and user communities still have been using Python 2.7. This directly translates to supportability and knowledge base; therefore, I have decided to stick with Python 2.7 when it comes to Ryu applications.

As we have seen so far, the Ryu framework basically breaks down OpenFlow events and dispatches them to the right functions. The framework takes care of the basic operations, such as handling the communication with the switch and decoding the right OpenFlow protocol based on the version as well as providing the libraries to build and parse various protocol packets (such as BGP). In the next section, we will see how we can look at the specific event message contents so that we can further process them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.226.121