4

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.

8
  • What is “a very large number”? Do you really need to ping all of them every second?
    – Daniel B
    Commented May 26, 2017 at 15:04
  • 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.
    – Thomas
    Commented May 26, 2017 at 15:11
  • -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
    – Jimmy_A
    Commented May 26, 2017 at 15:11
  • 1
    In the case of ping on Windows, -l indicates buffer size. This wouldn't really matter, unless your ICMP packets are getting buffered.
    – Patrick
    Commented May 26, 2017 at 15:18
  • 1
    @Patrick, ok got it. I didn't think that the same argument in windows will do different things than it does in Linux
    – Jimmy_A
    Commented May 26, 2017 at 15:20

1 Answer 1

8

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .