-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_butterfly_forwarding_experiments.sh
executable file
·46 lines (39 loc) · 1.4 KB
/
run_butterfly_forwarding_experiments.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
OPTIND=1
# Initialize our own variables:
i_face_1="h2-eth0"
i_face_2="h3-eth0"
n_packets=700
exp_type="butterfly_forwarding"
bandwidth=0.05
while getopts "h?i:j:n" opt; do
case "$opt" in
h|\?)
echo "./run_experiments.sh -i <Interface name for receive stream 1> -j <Interface name for receive stream 2> -n <Number of packets to send> "
exit 0
;;
i) i_face_1=$OPTARG
;;
j) i_face_2=$OPTARG
;;
n) n_packets=$OPTARG
;;
esac
done
echo "Iface 1: " $i_face_1
echo "Iface 2: " $i_face_2
echo "NPackets: " $n_packets
echo "Experiemt type: " $exp_type
for send_rate in 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
do
for pkt_size in 4096
do
echo "Configuration of next experiment ...."
echo "Payload size = " $pkt_size
sudo python experiments/experiment.py --iface1 $i_face_1 --iface2 $i_face_2 --npackets $n_packets --type $exp_type --payload $pkt_size --rate $send_rate --bw $bandwidth
rm -rf experiments/pcaps/pcaps_butterfly_fwd_payload_${pkt_size}_send_rate_${send_rate}
mkdir -p experiments/pcaps/pcaps_butterfly_fwd_payload_${pkt_size}_send_rate_${send_rate}
cp build/*.pcap experiments/pcaps/pcaps_butterfly_fwd_payload_${pkt_size}_send_rate_${send_rate}
sudo chmod -R 777 experiments/pcaps/pcaps_butterfly_fwd_payload_${pkt_size}_send_rate_${send_rate}
done
done