Restored treeping64 and tre1024 examples and updated README.

This commit is contained in:
Bob Lantz
2010-03-24 17:04:11 -07:00
parent d93c6ef6ce
commit 45e82d0952
3 changed files with 75 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/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.net import init, Mininet
from mininet.node import KernelSwitch
from mininet.topolib import TreeTopo
def TreeNet( depth=1, fanout=2, **kwargs ):
"Convenience function for creating tree networks."
topo = TreeTopo( depth, fanout )
return Mininet( topo, **kwargs )
if __name__ == '__main__':
setLogLevel( 'info' )
init()
KernelSwitch.setup()
network = TreeNet( depth=2, fanout=32, switch=KernelSwitch )
network.run( CLI, network )