Commented out kernel ref, moved to Open vSwitch.

This commit is contained in:
Bob Lantz
2010-10-25 21:52:14 -07:00
parent 24baea734f
commit 11782ae0de
6 changed files with 23 additions and 22 deletions
+6 -5
View File
@@ -10,7 +10,7 @@ h1 <-> sN+1 <-> sN+2 .. sN+N-1
| | | | | |
h2 h3 hN h2 h3 hN
Note: by default, the reference controller only supports 16 WARNING: by default, the reference controller only supports 16
switches, so this test WILL NOT WORK unless you have recompiled switches, so this test WILL NOT WORK unless you have recompiled
your controller to support 100 switches (or more.) your controller to support 100 switches (or more.)
@@ -27,7 +27,8 @@ import sys
flush = sys.stdout.flush flush = sys.stdout.flush
from mininet.net import init, Mininet from mininet.net import init, Mininet
from mininet.node import KernelSwitch, UserSwitch, OVSKernelSwitch # from mininet.node import KernelSwitch
from mininet.node import UserSwitch, OVSKernelSwitch
from mininet.topo import Topo, Node from mininet.topo import Topo, Node
from mininet.log import lg from mininet.log import lg
@@ -68,7 +69,7 @@ def linearBandwidthTest( lengths ):
switchCount = max( lengths ) switchCount = max( lengths )
hostCount = switchCount + 1 hostCount = switchCount + 1
switches = { 'reference kernel': KernelSwitch, switches = { # 'reference kernel': KernelSwitch,
'reference user': UserSwitch, 'reference user': UserSwitch,
'Open vSwitch kernel': OVSKernelSwitch } 'Open vSwitch kernel': OVSKernelSwitch }
@@ -104,8 +105,8 @@ def linearBandwidthTest( lengths ):
print print
if __name__ == '__main__': if __name__ == '__main__':
lg.setLogLevel( 'warning' ) lg.setLogLevel( 'info' )
init() init()
sizes = [ 1, 10, 20 ] sizes = [ 1, 10, 20, 40, 60, 80, 100 ]
print "*** Running linearBandwidthTest", sizes print "*** Running linearBandwidthTest", sizes
linearBandwidthTest( sizes ) linearBandwidthTest( sizes )
+3 -3
View File
@@ -8,7 +8,7 @@ For a more complicated test example, see udpbwtest.py.
from mininet.cli import CLI from mininet.cli import CLI
from mininet.log import lg, info from mininet.log import lg, info
from mininet.net import Mininet from mininet.net import Mininet
from mininet.node import KernelSwitch from mininet.node import OVSKernelSwitch
from mininet.topolib import TreeTopo from mininet.topolib import TreeTopo
def ifconfigTest( net ): def ifconfigTest( net ):
@@ -20,9 +20,9 @@ def ifconfigTest( net ):
if __name__ == '__main__': if __name__ == '__main__':
lg.setLogLevel( 'info' ) lg.setLogLevel( 'info' )
info( "*** Initializing Mininet and kernel modules\n" ) info( "*** Initializing Mininet and kernel modules\n" )
KernelSwitch.setup() OVSKernelSwitch.setup()
info( "*** Creating network\n" ) info( "*** Creating network\n" )
network = Mininet( TreeTopo( depth=2, fanout=2 ), switch=KernelSwitch) network = Mininet( TreeTopo( depth=2, fanout=2 ), switch=OVSKernelSwitch)
info( "*** Starting network\n" ) info( "*** Starting network\n" )
network.start() network.start()
info( "*** Running ping test\n" ) info( "*** Running ping test\n" )
+9 -9
View File
@@ -9,7 +9,7 @@ For most tasks, the higher-level API will be preferable.
""" """
from mininet.net import init from mininet.net import init
from mininet.node import Node, KernelSwitch from mininet.node import Node, OVSKernelSwitch
from mininet.util import createLink from mininet.util import createLink
from mininet.log import setLogLevel, info from mininet.log import setLogLevel, info
@@ -32,27 +32,27 @@ def scratchNet( cname='controller', cargs='ptcp:' ):
info( str( h0 ) + '\n' ) info( str( h0 ) + '\n' )
info( str( h1 ) + '\n' ) info( str( h1 ) + '\n' )
info( "*** Starting network using kernel datapath\n" ) info( "*** Starting network using Open vSwitch kernel datapath\n" )
controller.cmd( cname + ' ' + cargs + '&' ) controller.cmd( cname + ' ' + cargs + '&' )
switch.cmd( 'dpctl deldp nl:0' ) switch.cmd( 'ovs-dpctl del-dp dp0' )
switch.cmd( 'dpctl adddp nl:0' ) switch.cmd( 'ovs-dpctl add-dp dp0' )
for intf in switch.intfs.values(): for intf in switch.intfs.values():
switch.cmd( 'dpctl addif nl:0 ' + intf ) print switch.cmd( 'ovs-dpctl add-if dp0 ' + intf )
switch.cmd( 'ofprotocol nl:0 tcp:localhost &' ) print switch.cmd( 'ovs-openflowd dp0 tcp:127.0.0.1 &' )
info( "*** Running test\n" ) info( "*** Running test\n" )
h0.cmdPrint( 'ping -c1 ' + h1.IP() ) h0.cmdPrint( 'ping -c1 ' + h1.IP() )
info( "*** Stopping network\n" ) info( "*** Stopping network\n" )
controller.cmd( 'kill %' + cname ) controller.cmd( 'kill %' + cname )
switch.cmd( 'dpctl deldp nl:0' ) switch.cmd( 'ovs-dpctl del-dp dp0' )
switch.cmd( 'kill %ofprotocol' ) switch.cmd( 'kill %ovs-openflowd' )
switch.deleteIntfs() switch.deleteIntfs()
info( '\n' ) info( '\n' )
if __name__ == '__main__': if __name__ == '__main__':
setLogLevel( 'info' ) setLogLevel( 'info' )
info( '*** Scratch network demo (kernel datapath)\n' ) info( '*** Scratch network demo (kernel datapath)\n' )
KernelSwitch.setup() OVSKernelSwitch.setup()
init() init()
scratchNet() scratchNet()
+2 -2
View File
@@ -19,7 +19,7 @@ demonstrates:
from mininet.net import Mininet from mininet.net import Mininet
from mininet.cli import CLI from mininet.cli import CLI
from mininet.log import lg from mininet.log import lg
from mininet.node import Node, KernelSwitch from mininet.node import Node, OVSKernelSwitch
from mininet.topolib import TreeTopo from mininet.topolib import TreeTopo
from mininet.util import createLink from mininet.util import createLink
@@ -67,5 +67,5 @@ def sshd( network, cmd='/usr/sbin/sshd', opts='-D' ):
if __name__ == '__main__': if __name__ == '__main__':
lg.setLogLevel( 'info') lg.setLogLevel( 'info')
net = TreeNet( depth=1, fanout=4, switch=KernelSwitch ) net = TreeNet( depth=1, fanout=4, switch=OVSKernelSwitch )
sshd( net ) sshd( net )
+2 -2
View File
@@ -9,10 +9,10 @@ and running sysctl -p. Check util/sysctl_addon.
from mininet.cli import CLI from mininet.cli import CLI
from mininet.log import setLogLevel from mininet.log import setLogLevel
from mininet.node import KernelSwitch from mininet.node import OVSKernelSwitch
from mininet.topolib import TreeNet from mininet.topolib import TreeNet
if __name__ == '__main__': if __name__ == '__main__':
setLogLevel( 'info' ) setLogLevel( 'info' )
network = TreeNet( depth=2, fanout=32, switch=KernelSwitch ) network = TreeNet( depth=2, fanout=32, switch=OVSKernelSwitch )
network.run( CLI, network ) network.run( CLI, network )
+1 -1
View File
@@ -10,7 +10,7 @@ def treePing64():
"Run ping test on 64-node tree networks." "Run ping test on 64-node tree networks."
results = {} results = {}
switches = { 'reference kernel': KernelSwitch, switches = { # 'reference kernel': KernelSwitch,
'reference user': UserSwitch, 'reference user': UserSwitch,
'Open vSwitch kernel': OVSKernelSwitch } 'Open vSwitch kernel': OVSKernelSwitch }