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
73a323f2
Commit
73a323f2
authored
15 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Made compatible with rearranged args for createLink.
parent
315cbf9e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/scratchnet.py
+2
-2
2 additions, 2 deletions
examples/scratchnet.py
examples/scratchnetuser.py
+8
-8
8 additions, 8 deletions
examples/scratchnetuser.py
with
10 additions
and
10 deletions
examples/scratchnet.py
+
2
−
2
View file @
73a323f2
...
...
@@ -21,8 +21,8 @@ def scratchNet( cname='controller', cargs='ptcp:' ):
h1
=
Node
(
'
h1
'
)
info
(
"
*** Creating links
\n
"
)
createLink
(
node1
=
h0
,
port1
=
0
,
node2
=
switch
,
port2
=
0
)
createLink
(
node1
=
h1
,
port1
=
0
,
node2
=
switch
,
port2
=
1
)
createLink
(
node1
=
h0
,
node2
=
switch
,
port1
=
0
,
port2
=
0
)
createLink
(
node1
=
h1
,
node2
=
switch
,
port1
=
0
,
port2
=
1
)
info
(
"
*** Configuring hosts
\n
"
)
h0
.
setIP
(
h0
.
intfs
[
0
],
'
192.168.123.1
'
,
24
)
...
...
This diff is collapsed.
Click to expand it.
examples/scratchnetuser.py
+
8
−
8
View file @
73a323f2
...
...
@@ -26,17 +26,17 @@ def scratchNetUser( cname='controller', cargs='ptcp:' ):
switch
=
Node
(
'
s0
'
)
h0
=
Node
(
'
h0
'
)
h1
=
Node
(
'
h1
'
)
createLink
(
controller
,
0
,
switch
,
0
)
createLink
(
h0
,
0
,
switch
,
1
)
createLink
(
h1
,
0
,
switch
,
2
)
cintf
,
sintf
=
createLink
(
controller
,
switch
)
h0intf
,
sintf1
=
createLink
(
h0
,
switch
)
h1intf
,
sintf2
=
createLink
(
h1
,
switch
)
info
(
'
*** Configuring control network
\n
'
)
controller
.
setIP
(
c
ontroller
.
intfs
[
0
]
,
'
10.0.123.1
'
,
24
)
switch
.
setIP
(
s
witch
.
intfs
[
0
]
,
'
10.0.123.2
'
,
24
)
controller
.
setIP
(
c
intf
,
'
10.0.123.1
'
,
24
)
switch
.
setIP
(
s
intf
,
'
10.0.123.2
'
,
24
)
info
(
'
*** Configuring hosts
\n
'
)
h0
.
setIP
(
h0
.
intf
s
[
0
]
,
'
192.168.123.1
'
,
24
)
h1
.
setIP
(
h1
.
intf
s
[
0
]
,
'
192.168.123.2
'
,
24
)
h0
.
setIP
(
h0intf
,
'
192.168.123.1
'
,
24
)
h1
.
setIP
(
h1intf
,
'
192.168.123.2
'
,
24
)
info
(
'
*** Network state:
\n
'
)
for
node
in
controller
,
switch
,
h0
,
h1
:
...
...
@@ -45,7 +45,7 @@ def scratchNetUser( cname='controller', cargs='ptcp:' ):
info
(
'
*** Starting controller and user datapath
\n
'
)
controller
.
cmd
(
cname
+
'
'
+
cargs
+
'
&
'
)
switch
.
cmd
(
'
ifconfig lo 127.0.0.1
'
)
intfs
=
[
s
witch
.
intfs
[
port
]
for
port
in
(
1
,
2
)
]
intfs
=
[
s
intf1
,
sintf2
]
switch
.
cmd
(
'
ofdatapath -i
'
+
'
,
'
.
join
(
intfs
)
+
'
ptcp: &
'
)
switch
.
cmd
(
'
ofprotocol tcp:
'
+
controller
.
IP
()
+
'
tcp:localhost &
'
)
...
...
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