4 killall -9 run_streams_dns.sh
17 #Update destination (vLB) IP
18 VLB_IPADDR=$(cat /opt/config/vlb_ipaddr.txt)
19 IPADDR1=$(cat /opt/config/local_private_ipaddr.txt)
20 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns1
21 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns2
22 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns3
23 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns4
24 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns5
25 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns6
26 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns7
27 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns8
28 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns9
29 sed -i -e "0,/UDP/ s/UDP:.*/UDP: "$IPADDR1" -> "$VLB_IPADDR"/" /opt/dns_streams/stream_dns10
31 #Update source ports (make them random)
32 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns1
33 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns2
34 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns3
35 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns4
36 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns5
37 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns6
38 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns7
39 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns8
40 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns9
41 sed -i -e "s/.*-> 53.*/ UDP: $RANDOM -> 53/" /opt/dns_streams/stream_dns10
43 vppctl exec /opt/dns_streams/stream_dns1
44 vppctl exec /opt/dns_streams/stream_dns2
45 vppctl exec /opt/dns_streams/stream_dns3
46 vppctl exec /opt/dns_streams/stream_dns4
47 vppctl exec /opt/dns_streams/stream_dns5
48 vppctl exec /opt/dns_streams/stream_dns6
49 vppctl exec /opt/dns_streams/stream_dns7
50 vppctl exec /opt/dns_streams/stream_dns8
51 vppctl exec /opt/dns_streams/stream_dns9
52 vppctl exec /opt/dns_streams/stream_dns10
54 #Resume stream execution
56 ./run_streams_dns.sh &>/dev/null &disown