Fixed treePing64.
Minor tweaks to other files.
This commit is contained in:
@@ -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
|
allows a complete OpenFlow network to be simulated on top of a single
|
||||||
Linux kernel.
|
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:
|
In order to run Mininet, you must have:
|
||||||
|
|
||||||
* A Linux 2.6.26 or greater kernel compiled with network namespace support
|
* A Linux 2.6.26 or greater kernel compiled with network namespace support
|
||||||
|
|||||||
@@ -7,6 +7,11 @@ the kernel and user datapaths.
|
|||||||
Each network looks like:
|
Each network looks like:
|
||||||
|
|
||||||
h0 <-> s0 <-> s1 .. sN <-> h1
|
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
|
from mininet import init, LinearNet, iperfTest
|
||||||
|
|||||||
+17
-14
@@ -1,25 +1,28 @@
|
|||||||
#!/usr/bin/python
|
#!/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
|
from mininet import init, TreeNet, pingTestVerbose
|
||||||
|
|
||||||
def bigTreePing64():
|
def treePing64():
|
||||||
results = {}
|
results = {}
|
||||||
|
datapaths = [ 'kernel', 'user' ]
|
||||||
print "*** Testing Mininet with kernel and user datapath"
|
|
||||||
|
|
||||||
for datapath in [ 'kernel', 'user' ]:
|
print "*** Testing Mininet with kernel and user datapaths"
|
||||||
|
|
||||||
|
for datapath in datapaths:
|
||||||
k = datapath == 'kernel'
|
k = datapath == 'kernel'
|
||||||
results[ datapath ] = []
|
network = TreeNet( depth=2, fanout=8, kernel=k )
|
||||||
for switchCount in range( 1, 4 ):
|
result = network.run( pingTestVerbose )
|
||||||
network = TreeNet( depth=3, fanout=4, kernel=k )
|
results[ datapath ] = result
|
||||||
testResult = network.run( pingTestVerbose )
|
|
||||||
results[ datapath ] += testResult
|
print
|
||||||
|
print "*** TreeNet ping results:"
|
||||||
print "*** Test results:", results
|
for datapath in datapaths:
|
||||||
|
print "%s:" % datapath, results[ datapath ]
|
||||||
|
print
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
init()
|
init()
|
||||||
bigTreePing64()
|
treePing64()
|
||||||
|
|
||||||
|
|||||||
@@ -482,7 +482,9 @@ class Network( object ):
|
|||||||
controller.stop(); controller.terminate()
|
controller.stop(); controller.terminate()
|
||||||
print "*** Stopping switches"
|
print "*** Stopping switches"
|
||||||
for switch in self.switches:
|
for switch in self.switches:
|
||||||
|
print switch.name, ; flush()
|
||||||
switch.stop() ; switch.terminate()
|
switch.stop() ; switch.terminate()
|
||||||
|
print
|
||||||
print "*** Stopping hosts"
|
print "*** Stopping hosts"
|
||||||
for host in self.hosts:
|
for host in self.hosts:
|
||||||
host.terminate()
|
host.terminate()
|
||||||
|
|||||||
Reference in New Issue
Block a user