How to Use Ping Command Parameters in CMD on Windows 10? – Ping include some parameters for using the basic Ping command as well as for using more advanced Ping. Ping is the most common program used to resolve network connectivity problems.
How to Use Ping Command Parameters in CMD on Windows 10?

How to Use Ping Command Parameters in CMD on Windows 10?

With Ping Parameters, you can solve the network problems on a network as detailed. You can easily test the network connection by pinging the LAN or WAN interfaces of your ADSL modem or Router. By default, Ping sends packets of 32 bytes.

On Windows operating systems, you can ping an IP address or an Internet website by opening the CMD command prompt. Using the ping command, you can continuously ping to the destination from a host or ping up to a certain number. The default Ping number is 4 when you ping an address.

By adding additional parameters to the ping command, you can ping an address and gain testing experience.

How to Use Ping Command Parameters on CMD?

After giving brief information about ping, let’s explain the parameters of the ping command step by step. To open the CMD prompt on the Windows operating system, press Windows Key + R and open the Run window. In the Run window, type CMD and click the Open button.

After you open the CMD prompt, type ping /? to display the ping command parameters and press Enter button. As you can see in the output below, there are quite a number of Ping parameters.

The ping parameters options are Usage and Options.

Usage: Explains the use of ping parameters.
Options: It explains the existing Ping parameters.

C:\>ping /?

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

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   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
                   Header).
    -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.

C:\>

 
   Step 1 | Ping -t Command

The ping -t command pings continuously to a specific IP address or Web site. And this process continues until stopped. You must press Ctrl + C to stop/terminate the continuous ping command.

C:\>ping -t 8.8.8.8

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=36ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=35ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 10, Received = 10, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 36ms, Average = 33ms
Control-C
^C
C:\>

 

   Step 2 | Ping -a Command

The ping -a command shows the computer name of the computer that has the IP address you ping. Ping the Google DNS server as in the following output and observe that the computer/server name is google-public-dns-a.google.com.

C:\>ping -a 8.8.8.8

Pinging google-public-dns-a.google.com [8.8.8.8] with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=32ms TTL=57
Reply from 8.8.8.8: bytes=32 time=35ms TTL=57
Reply from 8.8.8.8: bytes=32 time=34ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 35ms, Average = 33ms

C:\>

 
   Step 3 | Ping -n Command

The ping -n command pings to an IP address or website up to a specified count. This value is 4 by default. You can ping as many as you specify by adding the -n count to the ping command. Linux and MacOS systems do not have the ping count. If you want to ping the IP address or website up to count you specify on MacOS and Linux, you need to use the ping -n + number command.

If you are wondering how to ping on Linux and MacOS, please watch our Linux Ping Usage and MacOS Ping Usage videos.

The following ping -n command shows that the Google DNS server has been pinged 3 times.

C:\>ping -n 3 8.8.8.8

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=33ms TTL=57
Reply from 8.8.8.8: bytes=32 time=34ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 33ms, Maximum = 34ms, Average = 33ms

C:\>

 
   Step 4 | Ping -l Command

When you normally ping a destination, the size of the packet sent is 32 Bytes. You can increase this value with the ping -l command. The ping packet size limit is 65,500 bytes.

C:\>ping -l 2345 8.8.8.8

Pinging 8.8.8.8 with 2345 bytes of data:
Reply from 8.8.8.8: bytes=2345 time=68ms TTL=57
Reply from 8.8.8.8: bytes=2345 time=65ms TTL=57
Reply from 8.8.8.8: bytes=2345 time=62ms TTL=57
Reply from 8.8.8.8: bytes=2345 time=62ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 62ms, Maximum = 68ms, Average = 64ms

C:\>

 
   Step 5 | Ping -l flood Command

The ping -l -f command sends the specified packet size to the destination without fragmenting it. In short, it allows packets to be sent without fragmentation by adding the Don’t Fragment Flag 1 bit to the Echo Request packet.

The ping -f command can be used to solve the Path Maximum Transmission Unit (PMTU) problem. While the echo request packet is trying to pass through the routers, the packet is not fragmented.

C:\>ping -l 1500 -f 8.8.8.8

Pinging 8.8.8.8 with 1500 bytes of data:
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.
Packet needs to be fragmented but DF set.

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>ping -l 1234 -f 8.8.8.8

Pinging 8.8.8.8 with 1234 bytes of data:
Reply from 8.8.8.8: bytes=1234 time=48ms TTL=57
Reply from 8.8.8.8: bytes=1234 time=53ms TTL=57
Reply from 8.8.8.8: bytes=1234 time=49ms TTL=57
Reply from 8.8.8.8: bytes=1234 time=48ms TTL=57

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 48ms, Maximum = 53ms, Average = 49ms

C:\>

 
   Step 6 | Ping -i TTL Command

The ping -i command adds the TTL value to the packet sent to the destination. The default TTL value is 255, and may vary between devices. If you set the TTL value lower than the previous value, the packet destination address will never be reached and the message TTL Expired in Transit will be displayed.

C:\>ping www.google.com

Pinging www.google.com [172.217.17.196] with 32 bytes of data:
Reply from 172.217.17.196: bytes=32 time=44ms TTL=54
Reply from 172.217.17.196: bytes=32 time=38ms TTL=54
Reply from 172.217.17.196: bytes=32 time=40ms TTL=54
Reply from 172.217.17.196: bytes=32 time=44ms TTL=54

Ping statistics for 172.217.17.196:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 38ms, Maximum = 44ms, Average = 41ms

C:\>ping -i 9 www.google.com

Pinging www.google.com [172.217.17.196] with 32 bytes of data:
Reply from 209.85.143.115: TTL expired in transit.
Reply from 209.85.143.115: TTL expired in transit.
Reply from 209.85.143.115: TTL expired in transit.
Reply from 209.85.143.115: TTL expired in transit.

Ping statistics for 172.217.17.196:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

C:\>

 
   Step 7 | Ping -v TOS Command

The ping -v TOS command sets the Type of Service value in the IP header of the Echo Request packet to be sent to the destination. The Type of Service value is 0 by default and can be changed between 0 and 255.

   Step 8 | Ping -r Command

The ping -r command shows a map of the paths through which the Echo Reply packet is received for the Echo Request packet. The minimum value is 1 and the maximum value is 9.

C:\>ping -r 2 vmware.com

Pinging vmware.com [45.60.11.183] with 32 bytes of data:
Reply from 45.60.11.183: bytes=32 time=165ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1
Reply from 45.60.11.183: bytes=32 time=167ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1
Reply from 45.60.11.183: bytes=32 time=168ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1
Reply from 45.60.11.183: bytes=32 time=166ms TTL=53
    Route: 85.101.110.75 ->
           85.101.104.1

Ping statistics for 45.60.11.183:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 165ms, Maximum = 168ms, Average = 166ms

C:\>

 
   Step 9 | Ping -s Command

The ping -s command changes the Timestamp value in the IP address header and specifies the Hop Count time value. It saves time information for outgoing and incoming Echo packets. The default value for the ping -s command is 1, the maximum value is 9.

C:\>ping -s 3 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time=2ms TTL=64
    Timestamp: 192.168.1.1 : 14619372 ->
               192.168.1.1 : 14619372 ->
               192.168.1.250 : 14621765
Reply from 192.168.1.1: bytes=32 time=2ms TTL=64
    Timestamp: 192.168.1.1 : 14620404 ->
               192.168.1.1 : 14620404 ->
               192.168.1.250 : 14622796
Reply from 192.168.1.1: bytes=32 time=2ms TTL=64
    Timestamp: 192.168.1.1 : 14621449 ->
               192.168.1.1 : 14621449 ->
               192.168.1.250 : 14623841
Reply from 192.168.1.1: bytes=32 time=1ms TTL=64
    Timestamp: 192.168.1.1 : 14622469 ->
               192.168.1.1 : 14622469 ->
               192.168.1.250 : 14624860

Ping statistics for 192.168.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 2ms, Average = 1ms

C:\>

 
   Step 10 | Ping -j Host-List Command

The ping -j host-list command uses Loose Source Routing to set the Router cluster that a packet will go through. The next Router address is configured for the first destination of the package to be sent. The path of the ping packet configure with Host-List and the maximum number of IP addresses of Host-List is 9.

   Step 11 | Ping -k Host-List Command

The ping -k host-list command uses the Strict Source Route option in the IP header. The next Router or Interface must be active for the Strict Source Route. The maximum number of Host-List IP addresses is 9. The Host-List consists of IP numbers that are listed one after the other.

   Step 12 | Ping -w Timeout Command

The Ping -w Timeout command specifies the duration of the Echo Reply for the Echo Request packets to be sent. It evaluates the time slot in milliseconds. The default value is 4000ms (4 seconds).

If you ping a computer other than your IP block with ping -w 8000 192.168.2.1, the Request Timed Out message will be displayed every 8 seconds.

C:\>ping -w 8000 192.168.2.1

Pinging 192.168.2.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\>

 
   Step 13 | Ping -r Command

The ping -r command is only used for IPv6 construction. It follows the outgoing and incoming packets.

   Step 14 | Ping -S srcaddr Command

The ping -S srcaddr command is used to specify the source address.

C:\>ping -S 192.168.1.250 vmware.com

Pinging vmware.com [45.60.11.183] from 192.168.1.250 with 32 bytes of data:
Reply from 45.60.11.183: bytes=32 time=146ms TTL=54
Reply from 45.60.11.183: bytes=32 time=146ms TTL=54
Reply from 45.60.11.183: bytes=32 time=145ms TTL=54
Reply from 45.60.11.183: bytes=32 time=148ms TTL=54

Ping statistics for 45.60.11.183:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 145ms, Maximum = 148ms, Average = 146ms

C:\>

 
   Step 15 | Ping -4 Command

The ping-4 command forces IPv4 to ping.

   Step 16 | Ping -6 Command

The ping-6 command forces IPv6 to ping.

How to Use Ping Command Parameters in CMD on Windows 10? ⇒ Video

After explaining the ping commands/parameters, you can watch the video below to better understand the use of ping commands, and you can also subscribe to our YouTube channel to support us.

  Final Word

In this article, we have examined the use of Ping parameters using CMD on Windows operating systems to troubleshoot more detailed networking problems. Thanks for following us!

If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!

Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!

Articles Related to How to Use Ping Command Parameters

Products Related to How to Use Ping Command Parameters
Related Products


One thought on “How to Use Ping Command Parameters in CMD on Windows 10?

Leave a Reply

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

sixteen − 7 =