1

I have some problems with pinging hosts with big packet size.

I'm doing some research on latency between one configuration and another.

I have written bash/zsh script to make it simpler that pings 8.8.8.8 and then parses the output to get average ping value. Script below:

#!/bin/zsh
for SIZE in {100..65500..100}
do
    ping 8.8.8.8 -c 5 -s $SIZE > tempfile
    TEMP=$(cat tempfile | tail -1 | awk '{print $4}' | cut -d / -f 2)
    echo "$SIZE - $TEMP" | tee -a results
done
rm tempfile

The problem is that with big packets (more than 30kB when the standard value is 64b) ping just doesn't work, I don't get any response just like the server was unavailable. Interestingly, when I was in another location, everything worked fine (Internet connection is a bit worse there), problems there started about 60kB but here they start about 30kB and to get one (out of ~300 to the end and bigger=worse) result I need to call this script ~10-20 times. It's really annoying because for smaller packets it's working like a charm (with the same server 8.8.8.8).

Anybody has an idea what causes it?

1
  • This behavior is related with IP Fragmentation, when you packet size is bigger that your maximum transmission unit (MTU) takes more that one packet and become pretty inefficient, take a look in en.wikipedia.org/wiki/IP_fragmentation Commented Dec 1, 2018 at 12:38

1 Answer 1

0

If any fragment of such a large ping is dropped in either direction, you get no response at all. That's just how IP works. Check the IP stats for dropped fragments; this will bump up if the loss is on the return trip, but if it's on the outbound side, you get nothing back at all.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.