Junxiao Shi | 2feae5b | 2014-06-19 02:40:22 -0600 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| 3 | source ../multi-host.conf |
| 4 | |
| 5 | LOGPREFIX=$1 |
| 6 | STRATEGY=$2 |
| 7 | |
| 8 | mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_A.log |
| 9 | ssh $CTRL_B "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_B.log" |
| 10 | ssh $CTRL_C "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_C.log" |
| 11 | |
| 12 | sleep 1 |
| 13 | > logs/${LOGPREFIX}_nfdc.log |
| 14 | |
Eric Newberry | 7745c1a | 2017-04-20 00:23:05 -0700 | [diff] [blame] | 15 | nfdc strategy set / $STRATEGY &>> logs/${LOGPREFIX}_nfdc.log |
| 16 | ssh $CTRL_B "nfdc strategy set / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log |
| 17 | ssh $CTRL_C "nfdc strategy set / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log |
Junxiao Shi | 2feae5b | 2014-06-19 02:40:22 -0600 | [diff] [blame] | 18 | |
Eric Newberry | 7745c1a | 2017-04-20 00:23:05 -0700 | [diff] [blame] | 19 | ssh $CTRL_C "nfdc face create udp4://$IP4_B1" &>> logs/${LOGPREFIX}_nfdc.log |
| 20 | ssh $CTRL_C "nfdc route add /B udp4://$IP4_B1 cost 10" &>> logs/${LOGPREFIX}_nfdc.log |
| 21 | nfdc face create udp4://$IP4_B1 &>> logs/${LOGPREFIX}_nfdc.log |
| 22 | nfdc face create udp4://$IP4_C1 &>> logs/${LOGPREFIX}_nfdc.log |
| 23 | nfdc route add /B udp4://$IP4_B1 cost 10 &>> logs/${LOGPREFIX}_nfdc.log |
| 24 | nfdc route add /B udp4://$IP4_C1 cost 20 &>> logs/${LOGPREFIX}_nfdc.log |