summaryrefslogtreecommitdiffstats
path: root/run-server.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run-server.sh')
-rwxr-xr-xrun-server.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/run-server.sh b/run-server.sh
index 7d29c10..99330c2 100755
--- a/run-server.sh
+++ b/run-server.sh
@@ -8,9 +8,13 @@ function run {
ip=$1
+first_port=4000
+num_ports=27
mtu=1500 #max 9000
-[ -n "$1" ] || { echo "Usage: run <ip> [mtu]" ; exit 1 ; }
-[ -n "$2" ] && mtu=$2
+[ -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
ipinfo=$(ip addr show | grep $ip)
[ $? -eq 0 ] || { echo "Specified IP $ip is not found" ; exit 1 ; }
@@ -22,4 +26,4 @@ echo 8000 > /proc/sys/vm/nr_hugepages # 0
ip link set $int mtu $mtu
-run $ip
+run $ip $first_port $num_ports