Project

General

Profile

BATMAN V Tests » start_convergence_circle_1.sh

Simon Wunderlich, 11/09/2015 06:08 PM

 
1
#!/bin/sh
2

    
3
. ./common.sh
4

    
5
NUM=12
6

    
7
for i in $(seq 1 ${NUM}); 
8
do
9
	${VDESWITCH} \
10
		-d --hub --sock num0_${i}.ctl -f colourful.rc
11
	${VDESWITCH} \
12
		-d --hub --sock num1_${i}.ctl -f colourful.rc
13

    
14
done
15

    
16
for i in $(seq 1 ${NUM}); 
17
do
18
	if $(echo $IMAGE | grep -q "\.gz$"); then
19
		gunzip -c ${IMAGE} > num${i}.image
20
	else
21
		cp ${IMAGE} num${i}.image
22
	fi
23
	screen ${SUDO} ${QEMU} \
24
		-no-acpi -m 48M \
25
		-net vde,sock=num0_${i}.ctl,port=1,vlan=0 -net nic,macaddr=fe:f0:00:00:$(printf %02x $i):01,model=virtio,vlan=0 \
26
		-net vde,sock=num1_${i}.ctl,port=1,vlan=1 -net nic,macaddr=fe:f1:00:00:$(printf %02x $i):01,model=virtio,vlan=1 \
27
		-net nic,model=virtio,vlan=2 -net tap,ifname=tapwrt${i},vlan=2 \
28
        -nographic -drive file=num${i}.image,if=virtio
29
	sleep 1
30
	${SUDO} /sbin/ifconfig tapwrt${i} inet 192.168.${i}.1 up
31

    
32
done
33

    
34
# The circle I:
35
# A = 11
36
# B = 12
37
# Nx = x
38
wirefilter --daemon -v num0_11.ctl:num0_1.ctl
39
wirefilter --daemon -v num0_1.ctl:num0_2.ctl
40
wirefilter --daemon -v num0_2.ctl:num0_3.ctl
41
wirefilter --daemon -v num0_3.ctl:num0_4.ctl  --pidfile killmeTOP.pid
42
wirefilter --daemon -v num0_4.ctl:num0_5.ctl
43
wirefilter --daemon -v num0_5.ctl:num0_12.ctl
44

    
45
wirefilter --daemon -v num0_11.ctl:num0_6.ctl
46
wirefilter --daemon -v num0_6.ctl:num0_7.ctl
47
wirefilter --daemon -v num0_7.ctl:num0_8.ctl --pidfile killmeBOTTOM.pid
48
wirefilter --daemon -v num0_8.ctl:num0_9.ctl
49
wirefilter --daemon -v num0_9.ctl:num0_10.ctl
50
wirefilter --daemon -v num0_10.ctl:num0_12.ctl
(20-20/24)