Files
mininet/examples/grid.py
T
Bob Lantz 696a619d0e Minor tweaks and corrections.
Added commentary on control network to mininet.py.
Hopefully fixed linearbandwidth.py for real.
2009-12-15 18:50:44 -08:00

18 lines
520 B
Python
Executable File

#!/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 )