Statistics
| Branch: | Tag: | Revision:

mininet / examples / grid.py @ 696a619d

History | View | Annotate | Download (520 Bytes)

1
#!/usr/bin/python
2

    
3
"Instantiate a Grid network and use NOX as the controller."
4

    
5
from mininet import init, Controller, GridNet, Cli
6

    
7
class NoxController( Controller ):
8
   def __init__( self, name, **kwargs ):
9
      Controller.__init__( self, name, 
10
         controller='nox_core', 
11
         cargs='-v --libdir=/usr/local/lib -i ptcp: routing', 
12
         cdir='/usr/local/bin', **kwargs)
13
   
14
if __name__ == '__main__':
15
   init()   
16
   network = GridNet( 2, 2, kernel=True, Controller=NoxController )
17
   network.run( Cli )