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