use udp with iperf to measure loss. pings are not reliable

This commit is contained in:
cody burkard
2014-09-25 13:09:24 -07:00
parent 12095a12f4
commit 7eeaed992c
2 changed files with 15 additions and 35 deletions
+5 -6
View File
@@ -31,17 +31,16 @@ class SingleSwitchTopo(Topo):
def perfTest():
"Create network and run simple performance test"
topo = SingleSwitchTopo(n=4)
net = Mininet(topo=topo,
host=CPULimitedHost, link=TCLink)
topo = SingleSwitchTopo( n=4 )
net = Mininet( topo=topo,
host=CPULimitedHost, link=TCLink,
autoStaticArp=True )
net.start()
print "Dumping host connections"
dumpNodeConnections(net.hosts)
print "Testing network connectivity"
net.pingAll()
print "Testing bandwidth between h1 and h4"
h1, h4 = net.getNodeByName('h1', 'h4')
net.iperf((h1, h4))
results = net.iperf( ( h1, h4 ), l4Type='UDP' )
net.stop()
if __name__ == '__main__':