Commit ff4711d0 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

Launch babel (re6st like) and pim-dm automatically in topo-square.sh

parent 493b5da1
......@@ -105,26 +105,38 @@ xnsenter D -- ip addr add 30.0.0.2/24 dev db
xnsenter C -- ip addr add 40.0.0.1/24 dev cd
xnsenter D -- ip addr add 40.0.0.2/24 dev dc
# multicast routing
#xnsenter B -- ip route add 224.0.0.0/4 dev b1
#xnsenter C -- ip route add 224.0.0.0/4 dev c1
#
#xnsenter A -- ip route add 224.0.0.0/4 dev a1 # NOTE on A 224.0.0.0/4 is routed
#xnsenter A -- ip route append 224.0.0.0/4 dev a2 # to _both_ a1 and a2
# IPv6 addresses
xnsenter A -- ip addr add 2001:db8:1::1/48 dev lo
xnsenter B -- ip addr add 2001:db8:2::1/48 dev lo
xnsenter C -- ip addr add 2001:db8:3::1/48 dev lo
xnsenter D -- ip addr add 2001:db8:4::1/48 dev lo
# we need to mount private /var/run in each namespace so that pim-dm and babel can be started
xnsenter A -- mount -t tmpfs none /var/run
xnsenter B -- mount -t tmpfs none /var/run
xnsenter C -- mount -t tmpfs none /var/run
xnsenter D -- mount -t tmpfs none /var/run
xnsenter A -- mount -t tmpfs none /var/log
xnsenter B -- mount -t tmpfs none /var/log
xnsenter C -- mount -t tmpfs none /var/log
xnsenter D -- mount -t tmpfs none /var/log
sleep 2
# babeld
xnsenter A -- /opt/re6st/parts/babeld/bin/babeld -h 15 -H 15 -L /var/log/babeld.log -S /var/run/babeld.state -I /var/run/babeld.pid -s -C "ipv6-subtrees true" -C "redistribute local deny" -C "redistribute ip 2001:db8:1::1/48 eq 48" -C "default max-rtt-penalty 5000 rtt-max 500 rtt-decay 125" -C "install ip ::/0 eq 0 src-prefix 2001:db8::/32" -C "redistribute deny" -C "install pref-src 2001:db8:1::1" -C "interface ab type tunnel" -C "interface ac type tunnel" ab ac &
xnsenter B -- /opt/re6st/parts/babeld/bin/babeld -h 15 -H 15 -L /var/log/babeld.log -S /var/run/babeld.state -I /var/run/babeld.pid -s -C "ipv6-subtrees true" -C "redistribute local deny" -C "redistribute ip 2001:db8:2::1/48 eq 48" -C "default max-rtt-penalty 5000 rtt-max 500 rtt-decay 125" -C "install ip ::/0 eq 0 src-prefix 2001:db8::/32" -C "redistribute deny" -C "install pref-src 2001:db8:2::1" -C "interface ba type tunnel" -C "interface bd type tunnel" ba bd &
xnsenter C -- /opt/re6st/parts/babeld/bin/babeld -h 15 -H 15 -L /var/log/babeld.log -S /var/run/babeld.state -I /var/run/babeld.pid -s -C "ipv6-subtrees true" -C "redistribute local deny" -C "redistribute ip 2001:db8:3::1/48 eq 48" -C "default max-rtt-penalty 5000 rtt-max 500 rtt-decay 125" -C "install ip ::/0 eq 0 src-prefix 2001:db8::/32" -C "redistribute deny" -C "install pref-src 2001:db8:3::1" -C "interface cd type tunnel" -C "interface ca type tunnel" cd ca &
xnsenter D -- /opt/re6st/parts/babeld/bin/babeld -h 15 -H 15 -L /var/log/babeld.log -S /var/run/babeld.state -I /var/run/babeld.pid -s -C "ipv6-subtrees true" -C "redistribute local deny" -C "redistribute ip 2001:db8:4::1/48 eq 48" -C "default max-rtt-penalty 5000 rtt-max 500 rtt-decay 125" -C "install ip ::/0 eq 0 src-prefix 2001:db8::/32" -C "redistribute deny" -C "install pref-src 2001:db8:4::1" -C "interface db type tunnel" -C "interface dc type tunnel" db dc &
# pim-dm
sed -e 's/IF0/ab/g' -e 's/IF1/ac/g' pim-dm.yaml.tmpl > pim-dm_A.yaml
sed -e 's/IF0/ba/g' -e 's/IF1/bd/g' pim-dm.yaml.tmpl > pim-dm_B.yaml
sed -e 's/IF0/ca/g' -e 's/IF1/cd/g' pim-dm.yaml.tmpl > pim-dm_C.yaml
sed -e 's/IF0/dc/g' -e 's/IF1/db/g' pim-dm.yaml.tmpl > pim-dm_D.yaml
# we need to mount private /var/run in each namespace so that pim-dm can be started
#xnsenter A -- pim-dm -config pim-dm_A.yaml &
#xnsenter B -- pim-dm -config pim-dm_B.yaml &
#xnsenter C -- pim-dm -config pim-dm_C.yaml &
#xnsenter D -- pim-dm -config pim-dm_D.yaml &
xnsenter A -- pim-dm -config pim-dm_A.yaml &
xnsenter B -- pim-dm -config pim-dm_B.yaml &
xnsenter C -- pim-dm -config pim-dm_C.yaml &
xnsenter D -- pim-dm -config pim-dm_D.yaml &
# open terminals in A B C D for play
xnsenter A -- xfce4-terminal --title=A &
......
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