Skip to content
Snippets Groups Projects
treeping64.py 678 B
Newer Older
#!/usr/bin/python

Bob Lantz's avatar
Bob Lantz committed
"Create a 64-node tree network, and test connectivity using ping."
Bob Lantz's avatar
Bob Lantz committed
   
Bob Lantz's avatar
Bob Lantz committed
from mininet import init, TreeNet, pingTestVerbose
Bob Lantz's avatar
Bob Lantz committed
def treePing64():
Bob Lantz's avatar
Bob Lantz committed
   datapaths = [ 'kernel', 'user' ]
   
   print "*** Testing Mininet with kernel and user datapaths"
Bob Lantz's avatar
Bob Lantz committed
   for datapath in datapaths:
      k = datapath == 'kernel'
Bob Lantz's avatar
Bob Lantz committed
      network = TreeNet( depth=2, fanout=8, kernel=k )
      result = network.run( pingTestVerbose )
      results[ datapath ] = result
   
   print  
   print "*** TreeNet ping results:"
   for datapath in datapaths:
      print "%s:" % datapath, results[ datapath ]
   print
   
if __name__ == '__main__':
   init()
Bob Lantz's avatar
Bob Lantz committed
   treePing64()