Define MAC addresses, don't use random values
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
83cb7216b6
commit
792eca0889
10
start.sh
10
start.sh
|
@ -38,6 +38,7 @@ vde_plug --daemon switch:///tmp/switch2 null://
|
||||||
|
|
||||||
# Connect to the exterior
|
# Connect to the exterior
|
||||||
sudo vde_plug --daemon vde:///tmp/ext tap://vde0
|
sudo vde_plug --daemon vde:///tmp/ext tap://vde0
|
||||||
|
sudo ip link set dev vde0 address 02:00:00:00:00:00
|
||||||
sudo ip link set dev vde0 up
|
sudo ip link set dev vde0 up
|
||||||
sudo ip address add 10.2.1.1/30 dev vde0
|
sudo ip address add 10.2.1.1/30 dev vde0
|
||||||
sudo ip address add 2a0c:700:3012:3::ff:0/127 dev vde0
|
sudo ip address add 2a0c:700:3012:3::ff:0/127 dev vde0
|
||||||
|
@ -59,7 +60,8 @@ for i in 1 2 3 4; do
|
||||||
if [[ $i -eq 1 ]]; then
|
if [[ $i -eq 1 ]]; then
|
||||||
tmux send-keys -t ns$i "vde_plug --daemon vde:///tmp/ext tap://vde0" Enter
|
tmux send-keys -t ns$i "vde_plug --daemon vde:///tmp/ext tap://vde0" Enter
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
tmux send-keys -t ns$i "ip link set vde0 up" Enter
|
tmux send-keys -t ns$i "ip link set dev vde0 address 02:00:00:00:00:01" Enter
|
||||||
|
tmux send-keys -t ns$i "ip link set dev vde0 up" Enter
|
||||||
tmux send-keys -t ns$i "ip address add 10.2.1.2/30 dev vde0" Enter
|
tmux send-keys -t ns$i "ip address add 10.2.1.2/30 dev vde0" Enter
|
||||||
tmux send-keys -t ns$i "ip address add 2a0c:700:3012:3::ff:1/127 dev vde0" Enter
|
tmux send-keys -t ns$i "ip address add 2a0c:700:3012:3::ff:1/127 dev vde0" Enter
|
||||||
tmux send-keys -t ns$i "ip route add default via 10.2.1.1 dev vde0 proto kernel" Enter
|
tmux send-keys -t ns$i "ip route add default via 10.2.1.1 dev vde0 proto kernel" Enter
|
||||||
|
@ -77,7 +79,8 @@ echo "Enable links..."
|
||||||
for i in 1 2 3; do
|
for i in 1 2 3; do
|
||||||
tmux send-keys -t ns$i "vde_plug --daemon vde:///tmp/switch1 tap://vde1" Enter
|
tmux send-keys -t ns$i "vde_plug --daemon vde:///tmp/switch1 tap://vde1" Enter
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
tmux send-keys -t ns$i "ip link set vde1 up" Enter
|
tmux send-keys -t ns$i "ip link set dev vde1 address 02:00:00:00:01:0$i" Enter
|
||||||
|
tmux send-keys -t ns$i "ip link set dev vde1 up" Enter
|
||||||
tmux send-keys -t ns$i "ip address add 172.17.1.$i/32 dev vde1" Enter
|
tmux send-keys -t ns$i "ip address add 172.17.1.$i/32 dev vde1" Enter
|
||||||
tmux send-keys -t ns$i "ip address add 2a0c:700:3012:3::1:$i/128 dev vde1" Enter
|
tmux send-keys -t ns$i "ip address add 2a0c:700:3012:3::1:$i/128 dev vde1" Enter
|
||||||
tmux send-keys -t ns$i "echo \"interface vde1 type wired\" >> /tmp/ns$i/babeld.conf" Enter
|
tmux send-keys -t ns$i "echo \"interface vde1 type wired\" >> /tmp/ns$i/babeld.conf" Enter
|
||||||
|
@ -87,7 +90,8 @@ done
|
||||||
for i in 2 3 4; do
|
for i in 2 3 4; do
|
||||||
tmux send-keys -t ns$i "vde_plug --daemon vde:///tmp/switch2 tap://vde2" Enter
|
tmux send-keys -t ns$i "vde_plug --daemon vde:///tmp/switch2 tap://vde2" Enter
|
||||||
sleep 0.3
|
sleep 0.3
|
||||||
tmux send-keys -t ns$i "ip link set vde2 up" Enter
|
tmux send-keys -t ns$i "ip link set dev vde2 address 02:00:00:00:02:0$i" Enter
|
||||||
|
tmux send-keys -t ns$i "ip link set dev vde2 up" Enter
|
||||||
tmux send-keys -t ns$i "ip address add 172.17.2.$i/32 dev vde2" Enter
|
tmux send-keys -t ns$i "ip address add 172.17.2.$i/32 dev vde2" Enter
|
||||||
tmux send-keys -t ns$i "ip address add 2a0c:700:3012:3::2:$i/128 dev vde2" Enter
|
tmux send-keys -t ns$i "ip address add 2a0c:700:3012:3::2:$i/128 dev vde2" Enter
|
||||||
tmux send-keys -t ns$i "echo \"interface vde2 type wired\" >> /tmp/ns$i/babeld.conf" Enter
|
tmux send-keys -t ns$i "echo \"interface vde2 type wired\" >> /tmp/ns$i/babeld.conf" Enter
|
||||||
|
|
Loading…
Reference in New Issue