Statistics
| Branch: | Tag: | Revision:

mininet / examples / treeping64.py @ 51270ce4

History | View | Annotate | Download (686 Bytes)

1
#!/usr/bin/python
2

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

    
7
def treePing64():
8
   results = {}
9
   datapaths = [ 'user', 'kernel' ]
10
   
11
   print "*** Testing Mininet with user and kernel datapaths"
12
   
13
   for datapath in datapaths:
14
      k = datapath == 'kernel'
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
   
25
if __name__ == '__main__':
26
   init()
27
   treePing64()
28