Ubuntu 20.04 fixes:
- fixes sshd test
- speeds up examples/{treeping64,tree1024}.py
- debugging hacks/output for testLinkChange
- removes cfs from examples/popen.py
- improves nat in nodelib (netplan fixes?)
- makes some tests executable
- waits for switches to connect in tests to
avoid race conditions
-- adds mn -w option and wait CLI command
Changes:
- REMOVES default "-v" argument for Controller()
and adds verbose(=False) option; avoiding logging
makes it faster
- CHANGES waitConnected to wait for 5 seconds
as documented; we may wish to implement an argument
to -w to set this timeout
Issues?
- There may still be an issue with the ovs-netplan-clean
service causing the boot to hang ;-(
46 lines
1.3 KiB
Python
Executable File
46 lines
1.3 KiB
Python
Executable File
#!/usr/bin/python
|
|
|
|
"Create a 64-node tree network, and test connectivity using ping."
|
|
|
|
|
|
from mininet.log import setLogLevel, info
|
|
from mininet.node import UserSwitch, OVSKernelSwitch, Host, Controller
|
|
from mininet.topolib import TreeNet
|
|
|
|
|
|
class HostV4( Host ):
|
|
"Try to IPv6 and its awful neighbor discovery"
|
|
def __init__( self, *args, **kwargs ):
|
|
super( HostV4, self ).__init__( *args, **kwargs )
|
|
cfgs = [ 'all.disable_ipv6=1', 'default.disable_ipv6=1',
|
|
'default.autoconf=0', 'lo.autoconf=0' ]
|
|
for cfg in cfgs:
|
|
self.cmd( 'sysctl -w net.ipv6.conf.' + cfg )
|
|
|
|
|
|
|
|
|
|
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' )
|
|
|
|
if __name__ == '__main__':
|
|
setLogLevel( 'info' )
|
|
treePing64()
|