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
1bda2d21
Commit
1bda2d21
authored
15 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Changed to use Node.MAC().
parent
6f45478f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mininet/net.py
+7
-6
7 additions, 6 deletions
mininet/net.py
with
7 additions
and
6 deletions
mininet/net.py
+
7
−
6
View file @
1bda2d21
...
...
@@ -22,7 +22,8 @@
link/etc.
This version supports both the kernel and user space datapaths
from the OpenFlow reference implementation.
from the OpenFlow reference implementation (openflowswitch.org)
as well as OpenVSwitch (openvswitch.org.)
In kernel datapath mode, the controller and switches are simply
processes in the root namespace.
...
...
@@ -48,7 +49,7 @@
The basic naming scheme is as follows:
Host nodes are named h
1
-hN
Host nodes are named h
0
-hN
Switch nodes are named s0-sN
Controller nodes are named c0-cN
Interfaces are named {nodename}-eth0 .. {nodename}-ethN
...
...
@@ -66,8 +67,8 @@
bandwidth tests and running the mininet CLI.
Once the network is up and running, test code can easily get access
to
its
host and switch objects, which can then be used
for arbitrary experiments,
which
typically involv
e
running a series of
to host and switch objects, which can then be used
for arbitrary experiments, typically involv
ing
running a series of
commands on the hosts.
After all desired tests or activities have been completed, the stop()
...
...
@@ -318,7 +319,7 @@ def stopXterms( self ):
cleanUpScreens
()
def
setMacs
(
self
):
"""
Set MAC addrs to correspond to d
atapath ID
s on hosts.
"""
Set MAC addrs to correspond to d
efault MAC
s on hosts.
Assume that the host only has one interface.
"""
for
host
in
self
.
hosts
:
host
.
setMAC
(
host
.
intfs
[
0
],
host
.
defaultMAC
)
...
...
@@ -328,7 +329,7 @@ def staticArp( self ):
for
src
in
self
.
hosts
:
for
dst
in
self
.
hosts
:
if
src
!=
dst
:
src
.
setARP
(
ip
=
dst
.
IP
(),
mac
=
dst
.
default
MAC
)
src
.
setARP
(
ip
=
dst
.
IP
(),
mac
=
dst
.
MAC
()
)
def
start
(
self
):
"
Start controller and switches
"
...
...
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