The POX controller

The final section of Chapter 1, Review of TCP/IP Protocol Suite and Python Language, introduce to you another Python-based OpenFlow controller, POX. When OpenFlow was originally developed at Stanford, the original controller was NOX, written in Java. As an easier-to-learn alternative to NOX, POX was created. I personally used POX to learn OpenFlow a few years ago and thought it was an excellent learning tool. However, as time has passed, the development of POX seems to have slowed down a bit. For example, currently there is no active effort for Python 3. More importantly, officially, POX supports OpenFlow 1.0 and a number of Nicira extensions and has partial support for OpenFlow 1.1. Therefore, I have picked Ryu as the OpenFlow controller for this book. POX remains a viable alternative, however, for Python-based controllers if you are only working with OpenFlow 1.0.

Launching any of the applications in POX is similar to Ryu. On the SDNHub VM, POX is already installed under /home/ubuntu/pox. The pox.py module is equivalent to Ryu-manager. The controller will automatically look under the pox/ folder for applications.

Change to the /home/ubuntu/pox directory, and launch the application under pox/forwarding/tutorial_l2_hub. It is really easy:

 $ ./pox.py log.level --DEBUG forwarding.tutorial_l2_hub
POX 0.5.0 (eel) / Copyright 2011-2014 James McCauley, et al.
DEBUG:core:POX 0.5.0 (eel) going up...
DEBUG:core:Running on CPython (2.7.6/Oct 26 2016 20:30:19)
DEBUG:core:Platform is Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty
INFO:core:POX 0.5.0 (eel) is up.
DEBUG:openflow.of_01:Listening on 0.0.0.0:6633
INFO:openflow.of_01:[00-00-00-00-00-01 1] connected

Testing with Mininet of course does not change it:

 mininet> h1 ping -c 2 h2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=39.9 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=24.5 ms

--- 10.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 24.503/32.231/39.960/7.730 ms

We will not spend a lot of time learning about POX since our focus is on Ryu. POX has similar structures in regard to listening for OpenFlow events and launching callback functions as well as a packet parsing library.

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

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