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
5e0eddea
Commit
5e0eddea
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
f2a6886c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
4 deletions
+40
-4
namespace_demo/topo-B-A-C.sh
namespace_demo/topo-B-A-C.sh
+40
-4
No files found.
namespace_demo/topo-B-A-C.sh
View file @
5e0eddea
#!/bin/bash
#!/bin/bash
-ex
# topo B-A-C creates the following network topology:
# topo B-A-C creates the following network topology:
#
#
#
#
# netns
=B netns=A netns=
C
# netns
:B netns:A netns:
C
#
#
# B --- br0 --- A --- br1 --- C
# B --- br0 --- A --- br1 --- C
# b1 a1 a2 c1
# b1 a1 a2 c1
...
@@ -13,17 +13,53 @@
...
@@ -13,17 +13,53 @@
#
#
# Based on https://github.com/troglobit/smcroute/tree/master/test
# Based on https://github.com/troglobit/smcroute/tree/master/test
rm
-f
A B C
touch
A B C
touch
A B C
PID
=
$$
PID
=
$$
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
nsenter
--net
=
B
--
ip
link set
b1 up
ip
link set
B1 up
unshare
--net
=
A
--
ip
link set
lo up
nsenter
--net
=
A
--
ip
link
add a1
type
veth peer A1
nsenter
--net
=
A
--
ip
link set
A1 netns
$PID
nsenter
--net
=
A
--
ip
link set
a1 up
ip
link set
A1 up
ip
link
add br0
type
bridge
# vlan_filtering 1 mcast_snooping 0
ip
link set
B1 master br0
ip
link set
A1 master br0
ip
link set
br0 up
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
=
B
--
ip route add 224.0.0.0/4 dev b1
nsenter
--net
=
A
--
ip route add 224.0.0.0/4 dev a1
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 br0
type
bridge
# vlan_filtering 1 mcast_snooping 0
ip
link
add
type
a1
veth peer b1
ip
link
add
a1
type
veth peer b1
ip
link set
b1 master br0
ip
link set
b1 master br0
ip
link set
a1 up
ip
link set
a1 up
ip
link set
b1 up
ip
link set
b1 up
ip
link set
br0 up
ip
link set
br0 up
unshare
--net
=
B
--
ip
link set
lo 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
add B1
type
veth peer B
nsenter
--net
=
B
--
ip
link set
B netns
$PID
nsenter
--net
=
B
--
ip
link set
B netns
$PID
...
...
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