Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
0066ca5c
Commit
0066ca5c
authored
Aug 10, 2015
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #121 from iovisor/weichunc_dev
add connectivity validation in distributed bridge examples
parents
4aca4770
b264e03c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
examples/distributed_bridge/main.py
examples/distributed_bridge/main.py
+7
-1
examples/distributed_bridge/tunnel_mesh.py
examples/distributed_bridge/tunnel_mesh.py
+0
-1
No files found.
examples/distributed_bridge/main.py
View file @
0066ca5c
...
...
@@ -6,7 +6,7 @@ from sys import argv
from
builtins
import
input
from
pyroute2
import
IPRoute
,
NetNS
,
IPDB
,
NSPopen
from
simulation
import
Simulation
from
subprocess
import
PIPE
from
subprocess
import
PIPE
,
call
if
len
(
argv
)
>
1
and
argv
[
1
]
==
"mesh"
:
multicast
=
0
...
...
@@ -40,6 +40,12 @@ class TunnelSimulation(Simulation):
with
self
.
ipdb
.
create
(
ifname
=
"br-fabric"
,
kind
=
"bridge"
)
as
br
:
for
host
in
host_info
:
br
.
add_port
(
host
[
1
])
br
.
up
()
print
(
"Validating connectivity"
)
for
i
in
range
(
1
,
num_hosts
):
for
j
in
range
(
0
,
2
):
print
(
"VNI%d between host0 and host%d"
%
(
10000
+
j
,
i
))
call
([
"ip"
,
"netns"
,
"exec"
,
"host%d"
%
i
,
"ping"
,
"99.1.%d.1"
%
j
,
"-c"
,
"3"
,
"-i"
,
"0.2"
,
"-q"
])
try
:
sim
=
TunnelSimulation
(
ipdb
)
...
...
examples/distributed_bridge/tunnel_mesh.py
View file @
0066ca5c
...
...
@@ -76,6 +76,5 @@ try:
run
()
ipdb
.
release
()
input
(
""
)
print
(
"---"
)
finally
:
for
v
in
ifc_gc
:
call
([
"ip"
,
"link"
,
"del"
,
v
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment