blob: 5d8c65aa040f90da3e2c9fa1059a6152f7ca3713 [file] [log] [blame]
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source ../multi-host.conf
LOGPREFIX=$1
STRATEGY=$2
mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_A.log
ssh $CTRL_B "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_B.log"
ssh $CTRL_C "cd $DIR; mkdir -p logs; nfd-start &> logs/${LOGPREFIX}_nfd_C.log"
sleep 1
> logs/${LOGPREFIX}_nfdc.log
nfdc strategy set / $STRATEGY &>> logs/${LOGPREFIX}_nfdc.log
ssh $CTRL_B "nfdc strategy set / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log
ssh $CTRL_C "nfdc strategy set / $STRATEGY" &>> logs/${LOGPREFIX}_nfdc.log
ssh $CTRL_C "nfdc face create udp4://$IP4_B1" &>> logs/${LOGPREFIX}_nfdc.log
ssh $CTRL_C "nfdc route add /B udp4://$IP4_B1 cost 10" &>> logs/${LOGPREFIX}_nfdc.log
nfdc face create udp4://$IP4_B1 &>> logs/${LOGPREFIX}_nfdc.log
nfdc face create udp4://$IP4_C1 &>> logs/${LOGPREFIX}_nfdc.log
nfdc route add /B udp4://$IP4_B1 cost 10 &>> logs/${LOGPREFIX}_nfdc.log
nfdc route add /B udp4://$IP4_C1 cost 20 &>> logs/${LOGPREFIX}_nfdc.log