Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Olaf Bergmann
mininet
Commits
45e82d09
Commit
45e82d09
authored
14 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Restored treeping64 and tre1024 examples and updated README.
parent
d93c6ef6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/README
+11
-1
11 additions, 1 deletion
examples/README
examples/tree1024.py
+26
-0
26 additions, 0 deletions
examples/tree1024.py
examples/treeping64.py
+38
-0
38 additions, 0 deletions
examples/treeping64.py
with
75 additions
and
1 deletion
examples/README
+
11
−
1
View file @
45e82d09
...
...
@@ -29,8 +29,18 @@ to an interface in the root namespace (generaly the control network
already lives in the root namespace, so it does not need to be explicitly
connected.)
treeping64:
This example creates a 64-host tree network, and attempts to check full
connectivity using ping, for three different switch/datapath types.
tree1024.py:
This example attempts to create a 1024-host network, and then runs the
CLI on it. It may run into scalability limits, depending on available
memory and sysctl configuration (see INSTALL.)
udpbwtest.py:
This example shows how to run a test across an entire network, and monitor
the output of a set of hosts in real time.
This diff is collapsed.
Click to expand it.
examples/tree1024.py
0 → 100755
+
26
−
0
View file @
45e82d09
#!/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
)
This diff is collapsed.
Click to expand it.
examples/treeping64.py
0 → 100755
+
38
−
0
View file @
45e82d09
#!/usr/bin/python
"
Create a 64-node tree network, and test connectivity using ping.
"
from
mininet.cli
import
CLI
from
mininet.log
import
setLogLevel
from
mininet.net
import
init
,
Mininet
from
mininet.node
import
KernelSwitch
,
UserSwitch
,
OVSKernelSwitch
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
)
def
treePing64
():
results
=
{}
switches
=
{
'
reference kernel
'
:
KernelSwitch
,
'
reference user
'
:
UserSwitch
,
'
Open vSwitch kernel
'
:
OVSKernelSwitch
}
for
name
in
switches
.
keys
():
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
.
keys
():
print
"
%s: %d%% packet loss
"
%
(
name
,
results
[
name
]
)
print
if
__name__
==
'
__main__
'
:
setLogLevel
(
'
info
'
)
init
()
treePing64
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment