OK, now we run 'routing' for the nox configurations with loops.

Unfortunately, I can't test this at the moment since nox seems not to
be able to find the routing module.

Added/renamed examples: grid.py, tree1024.py

Added -v flag to nox arguments, so we have some chance of figuring
out why nox is dying, as it generally is.
This commit is contained in:
Bob Lantz
2009-12-14 22:13:53 -08:00
parent c53fa3ba32
commit 77131e8f24
4 changed files with 37 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/python
"Instantiate a Grid network and use NOX as the controller."
from mininet import init, Controller, GridNet, Cli
class NoxController( Controller ):
def __init__( self, name, **kwargs ):
Controller.__init__( self, name,
controller='nox_core',
cargs='-v --libdir=/usr/local/lib -i ptcp: routing',
cdir='/usr/local/bin', **kwargs)
if __name__ == '__main__':
init()
network = GridNet( 2, 2, kernel=True, Controller=NoxController)
network.run( Cli )
+4 -4
View File
@@ -9,10 +9,10 @@ from mininet import init, Controller, Network, Host, nameGen, Cli
from mininet import createLink, flush
class NoxController( Controller ):
"A customized Controller that uses NOX."
def __init__( self, name, **kwargs ):
Controller.__init__( self, name,
controller='nox_core', cargs='-i ptcp pyswitch',
def __init__( self, name, kernel=False **kwargs ):
Controller.__init__( self, name, kernel=kernel,
controller='nox_core',
cargs='-v --libdir=/usr/local/lib -i ptcp: routing',
cdir='/usr/local/bin', **kwargs)
class FatTree( Network ):
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/python
"""
Create a 1024-host network, and run the CLI on it.
If this fails because of kernel limits, you may have
to adjust them, e.g. by adding entries to /etc/sysctl.conf
and running sysctl -p.
"""
from mininet import init, TreeNet
if __name__ == '__main__':
init()
network = TreeNet( depth=2, fanout=32, kernel=True )
network.run( Cli )