2

I am using Ubuntu 14.0.4 LTS with Kernel 4.8.0-46-generic. I am trying to ping a peer device with ping interval lower than 1 second e.g 0.2 but I am not able to do that. I get the following error :

ping: bad timing interval

I execute ping in sudo mode but still without success. Have any one encountered this issue before?

Note: I tried on the other device which has Kernel 4.2.0 and it worked under sudo mode.

4
  • sudo ping -c3 -i 0.15 www.google.com works for me.
    – chili555
    Mar 31 '17 at 20:48
  • what do you get for ping -V? i.e. what version are you using? Mar 31 '17 at 22:54
  • @DougSmythies the version of the ping is s20150815. It is strange because the version on the other laptop which has Kernel 4.2.0 is s20121221
    – IoT
    Apr 3 '17 at 17:19
  • Well, that exact same version works for me. Apr 3 '17 at 20:28
3

The manual to ping states that only the super-user may set an interval to less than 0.2 seconds.

   -i interval
          Wait  interval seconds between sending each packet.  The default
          is to wait for one second between each packet normally,  or  not
          to  wait in flood mode. Only super-user may set interval to val‐
          ues less than 0.2 seconds.

I tried this out on a clean 14.04 installation and sub 0.2 intervals only work for the super-user, this is to stop ping floods from unprivileged users.

1
  • I have already executed the ping with sudo and in sudo bash and I am still getting the same error. However it worked on the other machine with Kernel 4.2.0
    – IoT
    Mar 31 '17 at 20:57
1

Try with command

sudo ping XXX.XXX.XXX.XXX -A

This command send packet as fast as possible More option you have here

1

In my case ping was using the current locale to interpret the interval value: ping -i 0.3 <ip> didn't work but ping -i 0,3 <ip> does.

This bug Decimal separator in ping -i is locale dependent from 2015 in Fedora's bugzilla says it is a bug(and I agree: scripts shouldn't change behavior depending on the system's locale)

This bug is affecting Ubuntu 20.04 (reported here)

0

Try to use uppercase I

sudo ping -I eth1 111.111.111.111

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.