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 ;-(
35 lines
811 B
Python
Executable File
35 lines
811 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
"""
|
|
This is a simple example that demonstrates multiple links
|
|
between nodes.
|
|
"""
|
|
|
|
from mininet.cli import CLI
|
|
from mininet.log import setLogLevel
|
|
from mininet.net import Mininet
|
|
from mininet.topo import Topo
|
|
|
|
def runMultiLink():
|
|
"Create and run multiple link network"
|
|
topo = simpleMultiLinkTopo( n=2 )
|
|
net = Mininet( topo=topo, waitConnected=True )
|
|
net.start()
|
|
CLI( net )
|
|
net.stop()
|
|
|
|
class simpleMultiLinkTopo( Topo ):
|
|
"Simple topology with multiple links"
|
|
|
|
def build( self, n, **_kwargs ):
|
|
h1, h2 = self.addHost( 'h1' ), self.addHost( 'h2' )
|
|
s1 = self.addSwitch( 's1' )
|
|
|
|
for _ in range( n ):
|
|
self.addLink( s1, h1 )
|
|
self.addLink( s1, h2 )
|
|
|
|
if __name__ == '__main__':
|
|
setLogLevel( 'info' )
|
|
runMultiLink()
|