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
4ccc7ee9
Commit
4ccc7ee9
authored
15 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Added examples, which may or may not work yet.
parent
95d9a374
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/bigTreePing64.py
+27
-0
27 additions, 0 deletions
examples/bigTreePing64.py
examples/linearBandwidth.py
+36
-0
36 additions, 0 deletions
examples/linearBandwidth.py
mininet.py
+1
-0
1 addition, 0 deletions
mininet.py
with
64 additions
and
0 deletions
examples/bigTreePing64.py
0 → 100755
+
27
−
0
View file @
4ccc7ee9
#!/usr/bin/python
from
mininet
import
init
,
TreeNet
,
iperfTest
def
bigTreePing64
():
"""
Create a tree network of depth 4 and fanout 2, and
test connectivity using pingTest.
"""
results
=
{}
print
"
*** Testing Mininet with kernel and user datapath
"
for
datapath
in
[
'
kernel
'
,
'
user
'
]:
k
=
datapath
==
'
kernel
'
results
[
datapath
]
=
[]
for
switchCount
in
range
(
1
,
4
):
print
"
*** Creating Linear Network of size
"
,
switchCount
network
=
TreeNet
(
depth
=
4
,
fanout
=
2
,
kernel
=
k
)
testResult
=
network
.
run
(
iperfTest
)
results
[
datapath
]
+=
testResult
print
"
*** Test results:
"
,
results
if
__name__
==
'
__main__
'
:
init
()
linearBandwidthTest
()
This diff is collapsed.
Click to expand it.
examples/linearBandwidth.py
0 → 100755
+
36
−
0
View file @
4ccc7ee9
#!/usr/bin/python
from
mininet
import
init
,
LinearNet
,
iperfTest
def
linearBandwidthTest
():
"""
Test bandwidth on a linear network of varying size, using both
the kernel and user datapaths.
"""
print
"
*** Testing Mininet with kernel and user datapath
"
datapaths
=
[
'
kernel
'
]
results
=
{}
for
datapath
in
datapaths
:
k
=
datapath
==
'
kernel
'
results
[
datapath
]
=
[]
for
switchCount
in
range
(
1
,
17
,
2
):
print
"
*** Creating Linear Network of size
"
,
switchCount
network
=
LinearNet
(
switchCount
,
k
)
bandwidth
=
network
.
run
(
iperfTest
)
results
[
datapath
]
+=
[
(
switchCount
,
bandwidth
)
]
for
datapath
in
datapaths
:
print
print
"
*** Linear network results for
"
,
datapath
,
"
datapath
"
print
result
=
results
[
datapath
]
for
switchCount
,
bandwidth
in
result
:
print
"
switchCount:
"
,
switchCount
,
"
bandwidth:
"
,
bandwidth
[
0
]
if
__name__
==
'
__main__
'
:
init
()
linearBandwidthTest
()
exit
(
1
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
mininet.py
+
1
−
0
View file @
4ccc7ee9
...
@@ -752,6 +752,7 @@ def init():
...
@@ -752,6 +752,7 @@ def init():
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
init
()
init
()
results
=
{}
results
=
{}
exit
(
1
)
print
"
*** Testing Mininet with kernel and user datapath
"
print
"
*** Testing Mininet with kernel and user datapath
"
for
datapath
in
[
'
kernel
'
,
'
user
'
]:
for
datapath
in
[
'
kernel
'
,
'
user
'
]:
k
=
datapath
==
'
kernel
'
k
=
datapath
==
'
kernel
'
...
...
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