def treePing64(): "Run ping test on 64-node tree networks." results = {} switches = { # 'reference kernel': KernelSwitch, 'reference user': UserSwitch, 'Open vSwitch kernel': OVSKernelSwitch } for name in switches: info( "*** Testing", name, "datapath\n" ) switch = switches[ name ] network = TreeNet( depth=2, fanout=8, switch=switch ) result = network.run( network.pingAll ) results[ name ] = result info( "\n*** Tree network ping results:\n" ) for name in switches: info( "%s: %d%% packet loss\n" % ( name, results[ name ] ) ) info( '\n' )
def treePing64(): "Run ping test on 64-node tree networks." results = {} switches = { 'reference user': UserSwitch, 'Open vSwitch kernel': OVSKernelSwitch } for name in switches: info( "*** Testing", name, "datapath\n" ) switch = switches[ name ] network = TreeNet( depth=2, fanout=8, switch=switch, waitConnected=True ) result = network.run( network.pingAll ) results[ name ] = result info( "\n*** Tree network ping results:\n" ) for name in switches: info( "%s: %d%% packet loss\n" % ( name, results[ name ] ) ) info( '\n' )
def treePing64(): "Run ping test on 64-node tree networks." results = {} switches = { # 'reference kernel': KernelSwitch, 'reference user': UserSwitch, 'Open vSwitch kernel': OVSKernelSwitch } for name in switches: print "*** Testing", name, "datapath" switch = switches[ name ] network = TreeNet( depth=2, fanout=8, switch=switch ) result = network.run( network.pingAll ) results[ name ] = result print print "*** Tree network ping results:" for name in switches: print "%s: %d%% packet loss" % ( name, results[ name ] ) print
#!/usr/bin/python """ Create a 1024-host network, and run the CLI on it. If this fails because of kernel limits, you may have to adjust them, e.g. by adding entries to /etc/sysctl.conf and running sysctl -p. Check util/sysctl_addon. """ from mininet.cli import CLI from mininet.log import setLogLevel from mininet.node import OVSSwitch from mininet.topolib import TreeNet if __name__ == '__main__': setLogLevel( 'info' ) network = TreeNet( depth=2, fanout=32, switch=OVSSwitch ) network.run( CLI, network )
#!/usr/bin/python """ Create a 1024-host network, and run the CLI on it. If this fails because of kernel limits, you may have to adjust them, e.g. by adding entries to /etc/sysctl.conf and running sysctl -p. Check util/sysctl_addon. """ from mininet.cli import CLI from mininet.log import setLogLevel from mininet.node import OVSSwitch from mininet.topolib import TreeNet from mininet.examples.treeping64 import HostV4 if __name__ == '__main__': setLogLevel( 'info' ) network = TreeNet( depth=2, fanout=32, host=HostV4, switch=OVSSwitch, waitConnected=True) network.run( CLI, network )