How To Continuous Ping In Windows, Linux, and MacOS?

The ping is one of the most popular commands for the users, system administrators, and network administrators. Even it is generally used simply to check remote system network connectivity it provides different features for testing. One of the useful features of the ping is the continuous ping which will continuously ping to the specified target.

How Does Continuous Ping Work?

The continuous ping is sending ping packets forever without interrupting. So in a continuous ping multiple ping packets will be send in a regular basis. A ping packet is an ICMP packet which is routed from source to the destination as long as the TTL is not 0.

Continuous Ping For Windows (Windows 7, 8, 10 and Server)

The ping is a command line tool and command which is executed via the MS-DOS, Command Line or PowerShell. So first we will open the command line from the start menu by typing msdos or cmd or powershell etc.

We will type the following ping command. The -t option is used for the continuous ping. By default, the ping command will send 4 packets to the target and then stop pinging.

> ping -t wisetut.com

During the continuous ping information about every ping, the packet will be printed on the screen. The target IP address, ping packet size, the ping time, and TTL information is provided. The continuous ping output will continue as long as it is not stopped and all-new output will be scrolled down on the screen automatically.

As its nature, continuous ping will continue forever but in most cases, you will need to stop it. A continuous ping can be stopped in Windows by using the CTRL+c key shortcut which is used to kill a process.

CTRL+c

Continuous Ping For Linux (Ubuntu, Debian, Mint, CentOS)

The Linux provides the ping command too. But the biggest difference from Windows is that the continuous ping features are provided by default. So there is no need to provide extra parameters to make ping continuous. We will just provide the ping target like below and the ping operation continues forever even the network is disconnected. But first, a Linux terminal should be opened from the menu.

$ ping wisetut.com

The output of the continuous ping can be stored inside a file easily by using the output redirection features of the bash. Just use the > redirect sign and provide the file name you want to store the output.

$ ping wisetut.com > wisetut_ping.txt

The target host can be also provided as an IP address.

$ ping 192.168.122.1 > wisetut_ping.txt

As the ping command works continuously by default you may want to restrict to ping count to a specific number. First way is using the CTR+C which will stop the continuous ping process and exit.

CTRL+C

The more reliable way is using the -c parameter which will specify the count of the ping packets. So we will provide the count as 5 for the following example.

$ ping -c 5 wisetut.com 

Continuous Ping For MacOS

The MacOS is an operating system that is derived from the Unix roots which are the same as the Linux operating systems and distributions. So the ping command of the MacOS provides the same behavior as the Linux distributions. First, open the Terminal from the Applications -> Utilities.

$ ping wisetut.com

Like Linux distributions the ping will run forever unless it is aborted. Alternatively we can also specify the ping count with the -c option.

$ ping -c 5 wisetut.com 

Continuous Ping For Cisco, Router, Firewall, Switch, and IOS

As a popular network brand with a lot of different products like Router, Firewall, Switch, and IOS platform. Cisco command-line interface also provides continuous ping with the repeat option. You should also provide the repeat count where in order to make it continuous.

$ ping 192.168.1.1 repeat 9999999

We can also make continuous ping for a domain or hostname like below.

$ ping wisetut.com repeat 9999999

Continuous Ping For Juniper and JunOS

Juniper is a BSD based platform which provides the same behavior as Linux. So there is no need for the extra parameters in order to continuous ping.

$ ping 192.168.1.1

We can also make continuous ping for a domain or hostname like below.

$ ping wisetut.com

Alternatively you can use GUI in order to ping remote system. As ping and continuous ping is a diagnostic operation you should use the Diagnostics Tool. Then follow Tools>Diagnostics>Continuous Ping or Ping>Continuous Ping .

Continuous Ping For Huawei

Another popular network brand is Huawei where you make create a continuous ping. The Huawei provides similar behavior to the Windows where the -c option is provided for the continuous ping.

$ ping -c 99999 192.168.1.1

We can also make continuous ping for a domain or hostname like below.

$ ping -c 99999 wisetut.com

Leave a Comment