Revision f4d9e05d

View differences:

README
15 15
allows a complete OpenFlow network to be simulated on top of a single
16 16
Linux kernel.
17 17

  
18
Mininet provides a set of Python classes and functions which enable
19
creation of OpenFlow networks of varying sizes and topologies.
20

  
18 21
In order to run Mininet, you must have:
19 22

  
20 23
* A Linux 2.6.26 or greater kernel compiled with network namespace support
examples/linearBandwidth.py
7 7
Each network looks like:
8 8

  
9 9
h0 <-> s0 <-> s1 .. sN <-> h1
10

  
11
Note: by default, the reference controller only supports 16
12
switches, so this test WILL NOT WORK unless you have recompiled
13
your controller to support a 100 switches (or more.)
14

  
10 15
"""
11 16
   
12 17
from mininet import init, LinearNet, iperfTest
examples/treePing64.py
1 1
#!/usr/bin/python
2 2

  
3
"Create a 64-node tree network, and test connectivity using pingTest."
3
"Create a 64-node tree network, and test connectivity using ping."
4 4
   
5 5
from mininet import init, TreeNet, pingTestVerbose
6 6

  
7
def bigTreePing64():
7
def treePing64():
8 8
   results = {}
9

  
10
   print "*** Testing Mininet with kernel and user datapath"
9
   datapaths = [ 'kernel', 'user' ]
10
   
11
   print "*** Testing Mininet with kernel and user datapaths"
11 12
   
12
   for datapath in [ 'kernel', 'user' ]:
13
   for datapath in datapaths:
13 14
      k = datapath == 'kernel'
14
      results[ datapath ] = []
15
      for switchCount in range( 1, 4 ):
16
         network = TreeNet( depth=3, fanout=4, kernel=k )
17
         testResult = network.run( pingTestVerbose )
18
         results[ datapath ] += testResult
19
         
20
   print "*** Test results:", results
21
      
15
      network = TreeNet( depth=2, fanout=8, kernel=k )
16
      result = network.run( pingTestVerbose )
17
      results[ datapath ] = result
18
   
19
   print  
20
   print "*** TreeNet ping results:"
21
   for datapath in datapaths:
22
      print "%s:" % datapath, results[ datapath ]
23
   print
24
   
22 25
if __name__ == '__main__':
23 26
   init()
24
   bigTreePing64()
27
   treePing64()
25 28

  
mininet.py
482 482
         controller.stop(); controller.terminate()
483 483
      print "*** Stopping switches"
484 484
      for switch in self.switches:
485
         print switch.name, ; flush()
485 486
         switch.stop() ; switch.terminate()
487
      print
486 488
      print "*** Stopping hosts"
487 489
      for host in self.hosts: 
488 490
         host.terminate()

Also available in: Unified diff