Pocket POX: Taking your OpenFlow controller with you
July 27, 2012 in POX
One of the goals for POX is to have it be easy to get up and running. This fits well with some of its broader goals (e.g., for use in education), and I am sure many people will attest is in contrast to NOX (especially before NOX verity). One of the things that falls out is that it’s pretty easy to get running almost anywhere. I’ve already shown it running on the BeOS-inspired Haiku OS. And while that’s cool, not a whole lot of us have a machine running Haiku. On the other hand, a whole lot of us have smartphones. So sure, why not run POX on one? That way we can all be assured of never getting into that embarassing situation when you’re at a party and everyone else brought an OpenFlow controller except you.
This turned out to be really pretty easy. First, I grabbed the Scripting Layer for Android (SL4A) and its Python for Android (Py4A) component. This required enabling installing applications from Unknown Sources, but I actually already had that on from some toying with Android development I had already done. Py4A is currently Python 2.6, and POX’s requirement is actually 2.7. So some features won’t work quite right, but for the most part things should go.
Next, I plugged my phone into my laptop via USB so that I could easily copy over POX. I copied it straight out of a working copy I already had. This worked, but there’s no easy way to pass commandline arguments to things running in Py4A, so I then tweaked the startup code so that it turned on verbose logging and ran l2_learning by default.
Presto: POX on my Droid X. I haven’t tried cbenching it, but I imagine it’s not super fast. Thus, I’d recommend modifying l2_learning to install MAC or IP rules instead of exact matches before using this in production.