Commit f2a6886c authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Léo-Paul Géneau

.

parent 2eb0a34a
...@@ -6,11 +6,15 @@ ...@@ -6,11 +6,15 @@
# #
# B --- br0 --- A --- br1 --- C # B --- br0 --- A --- br1 --- C
# b1 a1 a2 c1 # b1 a1 a2 c1
# B1 A1 A2 C1
# #
# should be run under unshare -mrun . # should be run under unshare -mrun .
# use nsenter --net={A,B,C} to enter into network namespace of A/B/C. # use nsenter --net={A,B,C} to enter into network namespace of A/B/C.
#
# Based on https://github.com/troglobit/smcroute/tree/master/test
touch A B C touch A B C
PID=$$
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 type a1 veth peer b1
...@@ -18,3 +22,9 @@ ip link set b1 master br0 ...@@ -18,3 +22,9 @@ 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
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment