ping test data size issue

The forum for help and support with FreeNATS as well as any useful hints and tips
Post Reply
Posts: 9
Joined: Sat Apr 16, 2011 7:18 pm

ping test data size issue

Post by philten » Sun Apr 17, 2011 9:47 am

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/ :

var $data_package = "PPPing";


var $data_package = "0123456789012345678901234567890123456789012345";

in order to send a data size of 54


Site Admin
Posts: 260
Joined: Fri May 30, 2008 9:09 pm
Location: UK

Re: ping test data size issue

Post by dave » Sun Apr 17, 2011 12:50 pm


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?



Posts: 9
Joined: Sat Apr 16, 2011 7:18 pm

Re: ping test data size issue

Post by philten » Mon Apr 18, 2011 7:03 am

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

-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

Post Reply