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
Kirill Smelkov
multicast-study
Commits
4c83f1ec
Commit
4c83f1ec
authored
Apr 28, 2022
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c889d140
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
tmcast.py
tmcast.py
+2
-0
topo-B-A-C.sh
topo-B-A-C.sh
+25
-4
No files found.
tmcast.py
View file @
4c83f1ec
...
...
@@ -75,6 +75,8 @@ def main():
G
=
G4
if
"6"
in
action
:
G
=
G6
if
G
is
None
:
raise
RuntimeError
(
"4/6 must be specified"
)
wg
=
sync
.
WorkGroup
(
context
.
background
())
if
"tx"
in
action
:
...
...
topo-B-A-C.sh
View file @
4c83f1ec
...
...
@@ -5,8 +5,8 @@
# netns:B netns:A netns:C
#
# B --- br0 --- A --- br1 --- C
# b1
a1 a2
c1
#
B1 A1 A2 C1
# b1
B1 A1 a1 a2 A2 C1
c1
#
#
# should be run under unshare -mrun .
# use nsenter --net={A,B,C} to enter into network namespace of A/B/C.
...
...
@@ -36,17 +36,38 @@ ip link set A1 master br0
ip
link set
br0 up
# A-br1-C
nsenter
--net
=
A
--
ip
link
add a2
type
veth peer A2
nsenter
--net
=
A
--
ip
link set
A2 netns
$PID
nsenter
--net
=
A
--
ip
link set
a2 up
ip
link set
A2 up
unshare
--net
=
C
--
ip
link set
lo up
nsenter
--net
=
C
--
ip
link
add c1
type
veth peer C1
nsenter
--net
=
C
--
ip
link set
C1 netns
$PID
nsenter
--net
=
C
--
ip
link set
c1 up
ip
link set
C1 up
ip
link
add br1
type
bridge
# vlan_filtering 1 mcast_snooping 0
ip
link set
C1 master br1
ip
link set
A2 master br1
ip
link set
br1 up
# addresses
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
nsenter
--net
=
C
--
ip addr add 20.0.0.1/24 dev c1
nsenter
--net
=
A
--
ip addr add 20.0.0.2/24 dev a2
# multicast routing
nsenter
--net
=
B
--
ip route add 224.0.0.0/4 dev b1
nsenter
--net
=
C
--
ip route add 224.0.0.0/4 dev c1
nsenter
--net
=
A
--
ip route add
224.0.0.0/4 dev a1
# XXX append route to
a2
nsenter
--net
=
A
--
ip route add
224.0.0.0/4 dev a1
# NOTE on A 224.0.0.0/4 is routed
nsenter
--net
=
A
--
ip route append 224.0.0.0/4 dev a2
# to _both_ a1 and
a2
# open terminals in A B C for play
nsenter
--net
=
B
--
xfce4-terminal
--title
=
B &
nsenter
--net
=
C
--
xfce4-terminal
--title
=
C &
nsenter
--net
=
A
--
xfce4-terminal
--title
=
A &
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