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

.

parent 5e0eddea
......@@ -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)
......
......@@ -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
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