DocumentsDownloadsWikiCommunityBlogAbout

OpenFlowVMS

From OpenFlow Wiki

Jump to: navigation, search

Contents


News

31 Dec 2009: Image to support OpenFlow 1.0 posted. OpenFlowVMS is OpenFlow 1.0 compatible

18 Nov 2009: Support OpenFlow userspace reference implementation

14 Oct 2009: Gitweb access!

4 Sept 2009: OpenFlowVMS repository has been shifted to openflowswitch.org/openflow-vms.git

Simulating OpenFlow Network(s)

When developing applications using OpenFlow, a small network of OpenFlow switches is often needed for testing and debugging. Using a simulated network for such development would be ideal, allowing more people to develop efficiently at their own pace. The OpenFlow Virtual Machine Simulation (OpenFlowVMS) package is developed to create that virtual simulated network in your very own desktop/laptop.

OpenFlowVMS is a set of Python scripts that create that virtual simulated network automatically, letting developers concentrate on their real tasks and not fight the details of setting up a testbed.

Setup and Installation

You will need a Linux system. If you have Windows or Mac, you can use a virtual machine. People have successfully used VMWare and VirtualBox. With the Linux system, we start by installing the dependencies. In Debian, run the following commands

sudo apt-get install vde2 graphviz gv qemu genisoimage psmisc debootstrap git git-core \
             screen xterm python2.5 python-xml

We now get OpenFlowVMS using git with

git clone git://openflowswitch.org/openflow-vms.git openflowvms

If you are sadly behind a firewall, try gitweb. More instructions for Git is available at the git page. Finally, make sure that

  • OpenFlowVMS/pylib is in your PYTHONPATH
  • OpenFlowVMS/bin is in your PATH

Next, create the working directory for yourself. It should look something like this, where the blue colored names are files.

<working directory>
 |- openflow.cd
      |- ofprotocol
      |- dpctl
      |- ofdatapath.ko(kernel datapath)
      |- ofdatapath (user datapath)
 |- kernel.bin
 |- hda.dsk

You will need either the kernel or the user datapath. You are now just steps away from your own OpenFlow network(s).

Howto

All code in OpenFlowVMS has in-code documentation. Being coded in Python, pydoc will works just fine. To view the pydoc documentation, run

pydoc -p 8888

and open http://localhost:8888 in your local browser. Further, command line interfaces (all of which are named "vms-xxx") has the "-h/--help" option working, so a quick reference of what to do is always available.

Finally, we have the following howtos to make it even easier.

  1. Getting the necessary files:
    • Create a disk image (hda.dsk)
      • vms-create-disk.sh automates the process
      • vms-qemu-run.py allows the disk image to updated thereafter, by using a qemu virtual machine (VM).
    • Create Linux kernel
      • Kernel compilation is being documented at noxrepo.org
      • To use userspace switch, you need CONFIG_TUN=y for the .config file.
      • For OpenFlow v1.0, you need to set the TC components to y too.
      • A sample config file can be found here
      • vms-compile-kernel.sh automates the kernel compilation
      • kernel.bin - last commit for this image is 94ad374a0751f40d25e22e036c37f7263569d24c
    • Compile OpenFlow binaries
      • From this step, you have ofdatapath.ko (in datapath/linux-2.6/) or ofdatapath(in udatapath/), dpctl (in utilities/) and secchan (in secchan/). If you are using the kernel datapath, you would want to make sure that the kernel used for compilation is the same as in the previous step.
      • vms-compile-openflow.py automates the process.
      • You can download from here binaries for OpenFlow v0.8.9 rev 4 and/or OpenFlow v1.0
  2. Creating your OpenFlow network(s)

For further enquiries, requests and/or bug reports, please post them to openflow-discuss@lists.stanford.edu, starting the subject line with OpenFlowVMS:. If you would like to correct my mistakes, make this better, add a new feature, etc., don't be shy and please contact KK. We would add you as a collaborator.

To Do's

This is a list of todo's in my mind that was be great, but I have not get to it. Anyone who is willing to get to them before me have my thanks.

  1. Separate the switch specific code from the general VM setup. By this, I mean to have the common part of setting up VMs and so on isolated from the commands to set up switches. The latter code would then be more easily adapted to different switches, e.g., Open vSwitch, reference userspace, etc.
  2. Support Open vSwitch.
  3. Write a simpler image building script in Python.

Acknowledgments

OpenFlowVMS is possible with thanks to the following people/organizations.

  • OpenFlowVMS can be considered a rewrite of start-vm/stop-vm/draw-vm created by the folks at noxrepo.org (with Ben Pfaff and Martin Casado deserving special mentions). Instead of bash scripts, OpenFlowVMS has adopted an xml configuration file, with an increased amount of laziness promoted. Some of the bash scripts continued to be used here.
  • An updated version of the noxrepo's script was created during my internship at DoCoMo USA Labs, under supervision of James Kempf and Cedric Westphal. My work has allowed wireless channel simulation and fully automated network setup in OpenFlowVMS.
Copyright 2008 by the OpenFlow Consortium. All rights reserved. Powered by MediaWiki and WordPress.