From f4d9e05d05631cf2671822f99108374cfcbd8b41 Mon Sep 17 00:00:00 2001 From: Bob Lantz <rlantz@cs.stanford.edu> Date: Fri, 11 Dec 2009 04:25:31 -0800 Subject: [PATCH] Fixed treePing64. Minor tweaks to other files. --- README | 3 +++ examples/linearBandwidth.py | 5 +++++ examples/treePing64.py | 31 +++++++++++++++++-------------- mininet.py | 2 ++ 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/README b/README index 7b588628..e9ae2572 100644 --- a/README +++ b/README @@ -15,6 +15,9 @@ datapath) are created as processes in separate network namespaces. This allows a complete OpenFlow network to be simulated on top of a single Linux kernel. +Mininet provides a set of Python classes and functions which enable +creation of OpenFlow networks of varying sizes and topologies. + In order to run Mininet, you must have: * A Linux 2.6.26 or greater kernel compiled with network namespace support diff --git a/examples/linearBandwidth.py b/examples/linearBandwidth.py index 5e3b3522..27f909e3 100755 --- a/examples/linearBandwidth.py +++ b/examples/linearBandwidth.py @@ -7,6 +7,11 @@ Each network looks like: h0 <-> s0 <-> s1 .. sN <-> h1 + +Note: by default, the reference controller only supports 16 +switches, so this test WILL NOT WORK unless you have recompiled +your controller to support a 100 switches (or more.) + """ from mininet import init, LinearNet, iperfTest diff --git a/examples/treePing64.py b/examples/treePing64.py index 2673af0c..e8062b22 100755 --- a/examples/treePing64.py +++ b/examples/treePing64.py @@ -1,25 +1,28 @@ #!/usr/bin/python -"Create a 64-node tree network, and test connectivity using pingTest." +"Create a 64-node tree network, and test connectivity using ping." from mininet import init, TreeNet, pingTestVerbose -def bigTreePing64(): +def treePing64(): results = {} - - print "*** Testing Mininet with kernel and user datapath" + datapaths = [ 'kernel', 'user' ] + + print "*** Testing Mininet with kernel and user datapaths" - for datapath in [ 'kernel', 'user' ]: + for datapath in datapaths: k = datapath == 'kernel' - results[ datapath ] = [] - for switchCount in range( 1, 4 ): - network = TreeNet( depth=3, fanout=4, kernel=k ) - testResult = network.run( pingTestVerbose ) - results[ datapath ] += testResult - - print "*** Test results:", results - + 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() - bigTreePing64() + treePing64() diff --git a/mininet.py b/mininet.py index 20b4e7a9..12cb92ee 100755 --- a/mininet.py +++ b/mininet.py @@ -482,7 +482,9 @@ def stop( self ): controller.stop(); controller.terminate() print "*** Stopping switches" for switch in self.switches: + print switch.name, ; flush() switch.stop() ; switch.terminate() + print print "*** Stopping hosts" for host in self.hosts: host.terminate() -- GitLab