Responses inline.

On Thu, 2010-11-11 at 15:24 -0500, Kavitesh Singh wrote:
> Hi,
> 
>  
> 
> I have recently started learning Openflow using NOX controller. I have
> downloaded the VMware image available on OpenFlow website having
> inbuilt NOX controller.
> 
>  
> 
> I am following the tutorial available at
> http://openflowswitch.org/wk/index.php/HOTITutorial2010
> 
>  
> 
> I require help on following issues, would appreciate if the developer
> community assist me this:
> 
> 1.       I am new to Python so it takes a bit of time for me to get
> hold of the APIs which are available in NOX controller. I am looking
> for some documentation on APIs which I can/would use in programming of
> NOX controller. I am not looking for generic tutorial on Python. 

Reading the code is probably the best way.  A lot of the good stuff is
in src/nox/lib/core.py and is somewhat documented in there.  The example
components (like pyswitch) are also useful.

There is also some good content on both the noxrepo and the OpenFlow
wikis.  For example:
http://noxrepo.org/noxwiki/index.php/Developing_in_NOX
http://noxrepo.org/noxwiki/index.php/FAQ
http://www.openflowswitch.org/wk/index.php/Brazil_tutorial#Learning_NOX

> 2.       I was able to run the NOX controller using “./nox_core -v -i
> ptcp: pytutorial” command. In this command the pytutorial is the
> pytutorial.py file. Would we not require to provide a full path for
> this file(~/noxcore/src/nox/coreapps/tutorial/pytutorial.py) or the
> VMware consist of some variables for this particular file? Can I
> replace this file with say my test.py and run the command normally by
> “./nox_core -v -i ptcp: test”

Actually, no.  The "pytutorial" in the commandline refers to the
pytutorial *component*.  That this particular component happens to be
implemented in a file called pytutorial.py is "just happenstance" -- it
could have been in foo.py.

NOX components are defined in the meta.json files (or meta.xml for older
versions).  These are scanned for and parsed when NOX starts up.  They
define (among other things): a component's name (pytutorial in your
case), its dependencies (which other components it needs to be loaded),
and where/how it is implemented (in your case, pytutorial.py, but this
could also be a shared library, etc.).

The first link to the NOX wiki above has further information on this
topic.

> 3.       I am trying to figure out a way in which packets coming from
> hosts are parsed by the switch using Python. I would like to know the
> source and destination address of the packets and also the port
> numbers like 8080,121 etc. Any clues to the types of Python APIs which
> I would be requiring would be a great help.

The code that does the parsing is in src/nox/lib/packet/.  In your case,
you are probably interested in ipv4.py, and tcp.py or udp.py.

> 4.       Also, for generating traffic between the nodes created using
> mIninet, should I use iPerf or cBench? 

I think iperf.  cBench *emulates* switches and only generates very
specific traffic for doing benchmarking.  I can't immediately think of
why it'd be desirable to use in conjunction with mininet.

> Thanks,
> 
> Kavitesh.



_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org

Reply via email to