What option to use for ping constantly until you stop it?

The Ping program is a widely used tool to check the accessibility of a computer network. All operating systems available till now have the ability to run the Ping command with various options to even continuously check the network resource or connection availability. However, if a firewall suppresses ping packets on the way from your computer to the host, it can falsely appear to be unreachable.

To do this, it sends echo request packets to the host via ICMP. Using the time difference between this and the response (echo reply), it calculates the runtime. Ping was defined in RFC 1574.

A less time span between sending between the sending of a data packet to a recipient and the response packet that is then immediately returned. The lower the ping value, the better and means the communication is fast which is very important for online gaming and other real-time heavy data transfer tasks.

But unlike Linux, the pinging on Windows will automatically get ended after sending 4 packets and in case you want to monitor some network resource then you have to run the command again and again which will not tell when and where the system is dropping or unable to communicate the remote server. However, this can be done using a Ping’s  option which allows us to ping continuously.

Ping continuously on Windows 10/8/7

  1. Open the command prompt.
  2. To do that you can either directly search for it in the search box or press Win key+R to open the RUN box and in that type cmd.
  3. Type ping along with the IP address or domain name which you want to ping. Therefore it will be like this: ping yahoo.com
  4. However, the above command will give only 4-time pings, therefore to make it constantly we use the flag -t
  5. Thus, the command will be ping yahoo.com -t

Ping continuously on Windows 10

Other PIng options to be used on Windows

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]]
[-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]
[-4] [-6] target_name

-t       Ping the specified host until stopped. (To stop - type Control-C.)
-a       Resolve addresses to hostnames.
-n       count Number of echo requests to send.
-l       size Send buffer size.
-f       Set Don't Fragment flag in packet (IPv4-only).
-i       TTL Time To Live.
-v       TOS Type Of Service (IPv4-only. This setting has been deprecated and has no effect on the type of service field in the IP
-r       count Record route for count hops (IPv4-only).
-s       count Timestamp for count hops (IPv4-only).
-j       host-list Loose source route along host-list (IPv4-only).
-k       host-list Strict source route along host-list (IPv4-only).
-w       timeout Timeout in milliseconds to wait for each reply.
-R       Use routing header to test reverse route also (IPv6-only). Per RFC 5095 the use of this routing header has been
deprecated. Some systems may drop echo requests if this header is used.
-S       srcaddr Source address to use.
-c       compartment Routing compartment identifier.
-p       Ping a Hyper-V Network Virtualization provider address.
-4       Force using IPv4.
-6       Force using IPv6.


Ping constantly on Linux

So, on Linux systems such as CentOS, Ubuntu, Debian, Linux, and others, we have nothing to do for a constant pinging. The normal command that is, e.g-  ping yahoo.com will be enough.

However, we can define the specific amount of time after the pining should automatically get closed on Linux. For that, the command will be timeout 30 ping yahoo.com

Other options to use with ping command linux

<destination> dns name or ip address
-a use audible ping
-A use adaptive ping
-B sticky source address
-c <count> stop after <count> replies
-D print timestamps
-d use SO_DEBUG socket option
-f flood ping
-h print help and exit
-I <interface> either interface name or address
-i <interval> seconds between sending each packet
-L suppress loopback of multicast packets
-l <preload> send <preload> number of packages while waiting replies
-m <mark> tag the packets going out
-M <pmtud opt> define mtu discovery, can be one of <do|dont|want>
-n no dns name resolution
-O report outstanding replies
-p <pattern> contents of padding byte
-q quiet output
-Q <tclass> use quality of service <tclass> bits
-s <size> use <size> as number of data bytes to be sent
-S <size> use <size> as SO_SNDBUF socket option value
-t <ttl> define time to live
-U print user-to-user latency
-v verbose output
-V print version and exit
-w <deadline> reply wait <deadline> in seconds
-W <timeout> time to wait for response

IPv4 options:
-4 use IPv4
-b allow pinging broadcast
-R record route
-T <timestamp> define timestamp, can be one of <tsonly|tsandaddr|tsprespec>

IPv6 options:
-6 use IPv6
-F <flowlabel> define flow label, default is random
-N <nodeinfo opt> use icmp6 node info query, try <help> as argument

How to use ping on Android smartphone

Well, as there is no direct access to the command line on Android phones, thus we can do two things either use a browser to access an online-based ping tool or download some app from the Play store. If you are a person who needs to access the PING command often then having an app will be a good idea.  Here is the link to one such app to download and install.

  • Install and Open the Ping app.
  • Enter the IP address or domain you want to ping
  • Tap on the Start button.
  • It starts constantly pining the network resource until you stop it mnaully.

Ping constantly on Android phone


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.