Knowledgebase
DrVoIP Support > DrVoIP Network, VoIP, Security & AWS Cloud! > Knowledgebase

Ping Command Line Options

Solution

Ping Command Syntax:

ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [-w timeout] [-R] [-S srcaddr] [-4] [-6] target [/?]

Tip: See How To Read Command Syntax if you're not sure how to interpret the ping command syntax above.

-t = Using this option will ping the target until you force it to stop using Ctrl-C.

-a = This ping command option will resolve, if possible, the hostname of an IP address target.

-n count = This option sets the number of ICMP Echo Request messages to send. If you execute the ping command without this option, four requests will be sent.

-l size = Use this option to set the size, in bytes, of the echo request packet from 32 to 65,527. The ping command will send a 32 byte echo request if you don't use the -l option.

-f = Use this ping command option to prevent ICMP Echo Requests from being fragmented by routers between you and the target. The -f option is most often used to troubleshoot Path Maximum Transmission Unit (PMTU) issues.

-i TTL = This option sets the Time to Live (TTL) value, the maximum of which is 255.

-v TOS = This option allows you to set a Type of Service (TOS) value. Beginning in Windows 7, this option no longer functions but still exists for compatibility reasons.

-r count = Use this ping command option to specify the number of hops between the your computer and the target computer or device that you'd like to be recorded and displayed. The maximum value for count is 9 so use the tracert command instead if you're interested in viewing all hops between two devices.

-s count = Use this option to report the time, in Internet Timestamp format, that each echo request is received and echo reply is sent. The maximum value for count is 4 meaning that only the first four hops can be time stamped.

-w timeout = Specifying a timeout value when executing the ping command adjusts the amount of time, in milliseconds, that ping waits for each reply. If you don't use the -w option, the default timeout value is used which is 4000, or 4 seconds.

-R = This option tells the ping command to trace the round trip path.

-S srcaddr = Use this option to specify the source address.

-4 = This forces the ping command to use IPv4 only but is only necessary if target is a hostname and not an IP address.

-6 = This forces the ping command to use IPv6 only but as with the -4 option, is only necessary when pinging a hostname.

target = This is the destination you wish to ping, either an IP address or a hostname.

/? = Use the help switch with the ping command to show detailed help about the command's several options.

Note: The -f, -v, -r, -s, -j, and -k options work when pinging IPv4 addresses only. The -R and -S options only work with IPv6.

Other less commonly used switches for the ping command exist including [-j host-list] and [-k host-list]. Execute ping /? from the Command Prompt for more information on these two options.

 
Was this article helpful? yes / no
Related articles Unpacking TAR files in Windows OS
ShoreTel on CISCO Switches using LLDP
Setting ShoreTel Option 156
Spoof Mac to enable ShoreTel License to run on new server
Article details
Article ID: 22
Category: IP Trouble Shooting
Rating (Votes): Article rated 3.2/5.0 (38)

 
« Go back