How to ping to infinity on a windows machine

Here are the major options for ping command.

-n Count    Determines the number of echo requests to send. The default is 4 requests.
-w Timeout    Enables you to adjust the time-out (in milliseconds). The default is 1,000 (a 1-second time-out).
-l Size        Enables you to adjust the size of the ping packet. The default size is 32 bytes.
-f            Sets the Do Not Fragment bit on the ping packet. By default, the ping packet allows fragmentation

So if you want ping to run for a long time or theoretically infinite, give an infinite value for the count parameter in the “-n” flag

ping -n 2000000000 <Host IP>

OR

ping -t <Host IP>

Also the “-w” can be used to increase the timeout for which the ping command waits for the return of the packet.

Leave a Reply

Your email address will not be published. Required fields are marked *