wiki:Internal/OpenFlow/Controllers/Nox

Version 3 (modified by akoshibe, 14 years ago) ( diff )

NOX - Network OS

NOX is an OpenFlow controller/ controller development platform. Here we'll use the "destiny" (v0.8) branch of NOX from the Git repository. As of now, a copy of the docs for v0.6 can be found under ./html in my home directory on external2. I shall move this to another, more appropriate place.

1. installation

  1. Install git, build-essential, doxygen (for up-to-date NOX docs)
    apt-get install git-core build-essential doxygen
    
  2. Pull NOX from git repo
    git clone git://noxrepo.org/nox
    
  3. Install dependencies
    sudo apt-get install autoconf automake g++ libtool python python-twisted swig libboost-dev libxerces-c2-dev libssl-dev make libboost-filesystem-dev libboost-test-dev python-dev
    
  4. Switch to the proper branch and build
    git checkout -b destiny origin/destiny
    ./boot.sh
    mkdir build
    cd build
    ../configure
    make
    
  5. generate documentation
    cd doc/doxygen            <<--from build directory, not ~/nox
    make html
    

2. using NOX

2.1. starting up NOX

nox_core is used to start the controller and to load any scripts. It is located under ~/nox/build/src . For example

./nox_core -v -i ptcp:6633 switch packetdump

Will load the "learning switch" script. It will show up as "lt-nox_core" under ps -ef.

2.2. creating a component (in C++)

The information on how to do this can be found in /html/Howto.html under the doxygen generated docs for nox. As the steps require file creation, compilation, ect, you may need root privelages on the machine. The rough steps are as follows:

  1. Run nox-new-c-app.py from coreapps, netapps, or webapps (all three directories are found in ${NOXPATH}/nox/src/nox).
     /home/openflow/nox/src/scripts/nox-new-c-app.py -v cnf-test
    

nox-new-c-app.py basically creates a directory containing the framework for your application (Makefile, meta.json, ect), basing it on coreapps/simple_c_app. Your app gets created in whichever directory you run nox-new-c-app.py from; in this case we created a new app "cnf-test" in directory netapps.

  1. run boot.sh and configure so nox can find and load the app when it starts up:
    sh /home/openflow/nox/boot.sh 
    /home/openflow/nox/configure
    
Note: See TracWiki for help on using the wiki.