#!/bin/bash
# Multiple ways to count up to 10.

echo

# for loop over packet sizes
for size in 50 250 500 750 1000 1250 1500
do
	# account for 8 bytes ICMP header and 20 bytes IPv4 header
	let "realsize = size - 8 - 20"
	echo "ping -s $realsize -c 50 -i 1 $1 > $1-p$size"
	# call ping (100 packets) and write to file
	ping -s $realsize -c 50 -i 1 $1 > $1-p$size
done  

echo; echo

Resource created Saturday 04 September 2021, 10:47:44 AM.

file: runping.sh


Back to top

COMP3331/COMP9331 21T3 (Computer Networks and Applications) is powered by WebCMS3
CRICOS Provider No. 00098G