Why is 32bytes the default ping size? Is it okay to use less?

5,629

Ethernet has a minimum frame size of 64 bytes. If you try to send less than that, your system will pad it to 64 bytes anyway, if it's being sent on Ethernet. Ping already sends close to minimum-sized frames:

14 bytes of Ethernet header
4 bytes of Ethernet checksum
20 bytes of IPv4 header
8 bytes of ICMP header
= 46 of 64 bytes, so using an 18 byte payload should give you a minimum sized frame, if I got my facts and arithmetic right.

Wi-Fi doesn't have a minimum frame size, so if your pings are going over Wi-Fi, a zero-length ping payload will use slightly less airtime.

I'll also note than even if you were saving a full 32 bytes on each of 9000 pings (and 9000 ping replies), that all adds up to only half a millisecond of gigabit Ethernet bandwidth. You've wasted far more of your company's resources on your salaried time thinking about this.

Share:
5,629

Related videos on Youtube

Thomas
Author by

Thomas

Updated on September 18, 2022

Comments

  • Thomas
    Thomas over 1 year

    I have a very large number of addresses I need to ping on a company network. I want to be as unobtrusive as possible. Would using ping 1.1.1.1 -l 1 reduce the strain on the network? Is the difference between 32 and 1 even worth the trouble? Is there a reason 32 is the default?

    I suppose it is worth mentioning I am on a windows box and using PowerShell.

    • Daniel B
      Daniel B almost 7 years
      What is “a very large number”? Do you really need to ping all of them every second?
    • Thomas
      Thomas almost 7 years
      About 9000. I am running scripts against them. Ideally, once the script is complete, I will not need to run it very often. Maybe a couple times a day. But my original question still stands.
    • Jimmy_A
      Jimmy_A almost 7 years
      -l 1 does not do what you think you do. -l is a preload option. Only a superuser can use it and it defines how many packets it will send without waiting for reply
    • Thomas
      Thomas almost 7 years
      "-l size Send buffer size."
    • Jimmy_A
      Jimmy_A almost 7 years
      -l preload. If preload is specified, ping sends that many packets not waiting for reply. Only the super-user may select preload more than 3.
    • Jimmy_A
      Jimmy_A almost 7 years
      I think you need -s instead of -l
    • Patrick
      Patrick almost 7 years
      In the case of ping on Windows, -l indicates buffer size. This wouldn't really matter, unless your ICMP packets are getting buffered.
    • Jimmy_A
      Jimmy_A almost 7 years
      @Patrick, ok got it. I didn't think that the same argument in windows will do different things than it does in Linux