Page 1 of 1

ping test data size issue

Posted: Sun Apr 17, 2011 9:47 am
by philten
I would like to share a tricky issue I just solved.

The "ping test" for three new nodes were always failing,
but, pinging the same hostname was always working fine from the shell on the freenats server ???

After following the code step by step, I understood that the cause was the ping data size of 14
which for some reason is refused (probably by a firewall somewhere)

Indeed, from the console "ping -s 14 hostname" always fails and "ping hostname" works fine.

To workaround this issue, I replaced in /server/base/tests/ppping.inc.php :

var $data_package = "PPPing";

by

var $data_package = "0123456789012345678901234567890123456789012345";

in order to send a data size of 54

Phil

Re: ping test data size issue

Posted: Sun Apr 17, 2011 12:50 pm
by dave
Hi,

Great - thanks for your feedback.

I need to refactor the whole ppping package anyway so will include your update in that and then put the new version into FreeNATS.

Is there any particular reason why 54, just wondering if it plus header was 64 or some magic number?

Thanks,

Dave.

Re: ping test data size issue

Posted: Mon Apr 18, 2011 7:03 am
by philten
No reason, actually I tried several values, it seem the thresold is 20,
below ping fails, 20 and above ping works.

Also, this seem to be the data size, not the total packet size,
I used 54 bytes for the total packet size.

I would suggest to use 56 which seem to be the default value:

# ping
BusyBox v1.14.0 (2009-05-25 16:08:27 PDT) multi-call binary

Usage: ping [OPTION]... host

Send ICMP ECHO_REQUEST packets to network hosts

Options:
-4, -6 Force IPv4 or IPv6 hostname resolution
-c CNT Send only CNT pings
-s SIZE Send SIZE data bytes in packets (default=56) <<<<<< SEE HERE <<<<<
-I iface/IP Use interface or IP address as source
-W timeout Seconds to wait for the first response (default:10)
(after all -c CNT packets are sent)
-w deadline Seconds until ping exits (default:infinite)
(can exit earlier with -c CNT)
-q Quiet, only displays output at start
and when finished