NOX

From Sb
Jump to: navigation, search

OpenFlow Main Page

NOX module extension for netconfd (Yuma tools)

General

NOX main page: http://noxrepo.org

docs: http://noxrepo.org/noxwiki/index.php/NOX_Installation

NOX source implementing Bloom filters: File:New.tar.gz

Examples for "laci.txt": File:Laci.2host 1switch.txt, File:Laci.3host 2switch.txt, File:Laci.3host 4switch.txt, File:Laci.txt

format: <datapath id> <port id> <Bloom id of output link> <real mac address of host OR 0 if it is connected to another switch>

greedy sources: File:Greedy sources.tar.gz

NOX HOWTO

New source files under the following directories:

  • noxcore/src/nox/coreapps/
  • noxcore/src/nox/netapps/
  • noxcore/src/nox/webapps/

For example, new.cc is in

noxcore/src/nox/coreapps/new/

Two other files are also necessary to be placed here:

  • Makefile.am
  • meta.xml

Makefile.am and meta.xml under the directory "noxcore/src/nox/coreapps/hub/" can be a good starting point. (Only regarding names should be replaced.)

An example for Makefile.am:

include ../../../Make.vars 
 
CONFIGURE_DEPENCIES = $(srcdir)/Makefile.am
 
EXTRA_DIST =\
	meta.xml
 
pkglib_LTLIBRARIES =		\
	new.la
 
new_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/nox
new_la_SOURCES = new.cc
new_la_LDFLAGS = -module -export-dynamic
 
NOX_RUNTIMEFILES = meta.xml
 
all-local: nox-all-local
clean-local: nox-clean-local 
install-exec-hook: nox-install-local

And an example for meta.xml

<?xml version="1.0" encoding="UTF-8"?>
<components:components xmlns:components="http://www.noxrepo.org/components.xsd">
  <component>
    <name>new</name>
    <library>new</library>
  </component>
</components:components>

Newer versions of NOX (from v0.9) apply json instead of xml.

Next, add the new application to noxcore/config.ac.in

Then

sudo make -j

(If you use nox and not compile the controller after the make command, the appropriate lines,words insert in the nox/config.ac too.)


If you have got the following error when run the NOX Classic (Zaku branch):

 
00001|nox|INFO:Starting nox_core (/home/debian/data/nox/build/src/.libs/lt-nox_core)
00002|nox|ERR:Cannot change the state of 'python' to INSTALLED:
'python' ran into an error:
    Unable to construct a Python component:
    Traceback (most recent call last):
         File "./nox/coreapps/pyrt/pyoxidereactor.py", line 364, in instance
             return pyoxidereactor(ctxt)
         File "./nox/coreapps/pyrt/pyoxidereactor.py", line 133, in __init__
             signal.signal(signal.SIGCHLD, self._handleSigchld)
    AttributeError: 'pyoxidereactor' object has no attribute '_handleSigchld'

Then adding the following function definition to ReactorBase class ('/usr/lib/python2.6/dist-packages/twisted/internet/base.py'), the problem seems to be gone.

    def _handleSigchld(self, signum, frame, _threadSupport=platform.supportsThreads()):
        from twisted.internet.process import reapAllProcesses
        if _threadSupport:
            self.callFromThread(reapAllProcesses)
        else:
            self.callLater(0, reapAllProcesses)
(See also)

Packet Filter for NOX, Floodlight and Trema

The following file contains the source code of the three apps mentioned above. The filter apps are quite dumb, they can only filter specific MAC IP addresses and Port numbers based on block list files. There is quite a lot of room for improvement.

File:Filter source.tar

Personal tools