summaryrefslogtreecommitdiffstats
path: root/run-client.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run-client.sh')
-rwxr-xr-xrun-client.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/run-client.sh b/run-client.sh
index e4b0f8f..7ed9967 100755
--- a/run-client.sh
+++ b/run-client.sh
@@ -8,8 +8,12 @@ function run {
ip=$1
mtu=1500 #max 9000
-[ -n "$1" ] || { echo "Usage: run <ip> [mtu]" ; exit 1 ; }
-[ -n "$2" ] && mtu=$2
+first_port=4000
+num_ports=27
+[ -n "$1" ] || { echo "Usage: run <ip> [first_port] [num_ports] [mtu]" ; exit 1 ; }
+[ -n "$2" ] && first_port=$2
+[ -n "$3" ] && num_ports=$3
+[ -n "$4" ] && mtu=$4
int=$(ip route show to match "$ip" | grep src | awk '{ print $3 }')
@@ -17,10 +21,10 @@ ip link set $int mtu $mtu
if [ $mtu -le 1500 ]; then
sed -i '' -e 's/numberOfProjectionsPerPacket.*/numberOfProjectionsPerPacket = 40/' config.cfg
- run 80000 "$ip"
+ run "$ip" $first_port $num_ports 120000
elif [ $mtu -eq 9000 ]; then
sed -i '' -e 's/numberOfProjectionsPerPacket.*/numberOfProjectionsPerPacket = 250/' config.cfg
- run 20000 "$ip"
+ run "$ip" $first_port $num_ports 20000
fi