Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
multicast-study
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
multicast-study
Commits
bfe4dc52
Commit
bfe4dc52
authored
Apr 28, 2022
by
Kirill Smelkov
Committed by
Léo-Paul Géneau
Apr 29, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5e0eddea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
20 deletions
+13
-20
namespace_demo/tmcast.py
namespace_demo/tmcast.py
+8
-1
namespace_demo/topo-B-A-C.sh
namespace_demo/topo-B-A-C.sh
+5
-19
No files found.
namespace_demo/tmcast.py
View file @
bfe4dc52
...
...
@@ -66,9 +66,16 @@ def rxloop(ctx, sk):
def
main
():
G
=
(
group4
,
port
)
action
=
sys
.
argv
[
1
]
G4
=
(
group4
,
port
)
G6
=
(
group6
,
port
)
G
=
None
if
"4"
in
action
:
G
=
G4
if
"6"
in
action
:
G
=
G6
wg
=
sync
.
WorkGroup
(
context
.
background
())
if
"tx"
in
action
:
sktx
=
mjoin_tx
(
*
G
)
...
...
namespace_demo/topo-B-A-C.sh
View file @
bfe4dc52
...
...
@@ -17,7 +17,7 @@ rm -f A B C
touch
A B C
PID
=
$$
# B-br0-A
unshare
--net
=
B
--
ip
link set
lo up
nsenter
--net
=
B
--
ip
link
add b1
type
veth peer B1
nsenter
--net
=
B
--
ip
link set
B1 netns
$PID
...
...
@@ -35,6 +35,8 @@ ip link set B1 master br0
ip
link set
A1 master br0
ip
link set
br0 up
# A-br1-C
nsenter
--net
=
B
--
ip addr add 10.0.0.1/24 dev b1
nsenter
--net
=
A
--
ip addr add 10.0.0.2/24 dev a1
...
...
@@ -42,25 +44,9 @@ nsenter --net=A -- ip addr add 10.0.0.2/24 dev a1
nsenter
--net
=
B
--
ip route add 224.0.0.0/4 dev b1
nsenter
--net
=
A
--
ip route add 224.0.0.0/4 dev a1
# XXX append route to a2
# open terminals in A B C for play
nsenter
--net
=
B
--
xfce4-terminal
--title
=
B &
nsenter
--net
=
A
--
xfce4-terminal
--title
=
A &
exit
0
ip
link
add br0
type
bridge
# vlan_filtering 1 mcast_snooping 0
ip
link
add a1
type
veth peer b1
ip
link set
b1 master br0
ip
link set
a1 up
ip
link set
b1 up
ip
link set
br0 up
unshare
--net
=
B
--
ip
link set
lo up
nsenter
--net
=
B
--
ip
link
add B1
type
veth peer B
nsenter
--net
=
B
--
ip
link set
B netns
$PID
ip
link set
B up
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