= 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), where ${NOXPATH} is the place with your working nox directory). {{{ /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 coreapps. 2. run `boot.sh` and `configure` so nox can find and load the app when it starts up: {{{ ./boot.sh #this is found in the root of your nox directory e.g. ~/nox/boot.sh cd build ../configure make }}} 3. to test if your app is there, you can watch out for it being loaded when you do a dry run of nox_core: {{{ root@node1-4:~/nox/build/src# ./nox_core -i ptcp:6633 -v 00001|nox|INFO:Starting nox_core (/home/openflow/nox/build/src/.libs/lt-nox_core) ... 00006|pyrt|DBG:Loading a component description file 'nox/coreapps/cnf_test/meta.json'. }}} or try loading it: {{{ ./nox_core -i ptcp:6633 -v "cnf test" }}} note that any underscores in the name of your app become spaces - e.g. "cnf_test" becomes "cnf test" If you see the following after issuing the above command, you have a working framework: {{{ 00046|openflow|DBG:Passive tcp interface bound to port 6633 00047|nox|INFO:nox bootstrap complete 00048|openflow|DBG:Passive tcp interface received connection 00049|openflow|DBG:stream: negotiated OpenFlow version 0x01 (we support versions 0x01 to 0x01 inclusive, peer no later than version 0x01) ... }}}