The ping command verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) echo Request messages. The receipt of corresponding echo Reply messages are displayed, along with round-trip times. ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. Used without parameters, ping displays help.
Syntax: ping [/t] [/a] [/n <Count>] [/l <Size>] [/f] [/I <TTL>] [/v <TOS>] [/r <Count>] [/s <Count>] [{/j <Hostlist> | /k <Hostlist>}] [/w <timeout>] [/R] [/S <Srcaddr>] [/4] [/6] <TargetName>
/t
Specifies that ping continue sending echo Request messages to the destination until interrupted. To interrupt and display statistics, press CTRL+break. To interrupt and quit ping, press CTRL+C.
/a
Specifies that reverse name resolution is performed on the destination IP address. If this is successful, ping displays the corresponding host name.
/n <Count>
Specifies the number of echo Request messages sent. The default is 4.
/l <Size>
Specifies the length, in bytes, of the Data field in the echo Request messages sent. The default is 32. The maximum Size is 65,527.
/f
Specifies that echo Request messages are sent with the Do not Fragment flag in the IP header set to 1 (available on IPv4 only). The echo Request message cannot be fragmented by routers in the path to the destination. This parameter is useful for troubleshooting path Maximum Transmission Unit (PMTU) problems.
/I <TTL>
Specifies the value of the TTL field in the IP header for echo Request messages sent. The default is the default TTL value for the host. The maximum TTL is 255.
/v <TOS>
Specifies the value of the type of Service (TOS) field in the IP header for echo Request messages sent (available on IPv4 only). The default is 0. TOS is specified as a decimal value from 0 through 255.
/r <Count>
Specifies that the Record Route option in the IP header is used to record the path taken by the echo Request message and corresponding echo Reply message (available on IPv4 only). Each hop in the path uses an entry in the Record Route option. If possible, specify a Count that is equal to or greater than the number of hops between the source and destination. The Count must be a minimum of 1 and a maximum of 9.
/s <Count>
Specifies that the Internet timestamp option in the IP header is used to record the time of arrival for the echo Request message and corresponding echo Reply message for each hop. The Count must be a minimum of 1 and a maximum of 4. This is required for link-local destination addresses.
/j <Hostlist>
Specifies that the echo Request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in Hostlist(available on IPv4 only). With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The host list is a series of IP addresses (in dotted decimal notation) separated by spaces.
/k <Hostlist>
Specifies that the echo Request messages use the Strict Source Route option in the IP header with the set of intermediate destinations specified in Hostlist(available on IPv4 only). With strict source routing, the next intermediate destination must be directly reachable (it must be a neighbor on an interface of the router). The maximum number of addresses or names in the host list is 9. The host list is a series of IP addresses (in dotted decimal notation) separated by spaces.
/w <timeout>
Specifies the amount of time, in milliseconds, to wait for the echo Reply message that corresponds to a given echo Request message to be received. If the echo Reply message is not received within the time-out, the “Request timed out” error message is displayed. The default time-out is 4000 (4 seconds).
/R
Specifies that the round-trip path is traced (available on IPv6 only).
/S <Srcaddr>
Specifies the source address to use (available on IPv6 only).
/4
Specifies that IPv4 is used to ping. This parameter is not required to identify the target host with an IPv4 address. It is only required to identify the target host by name.
/6
Specifies that IPv6 is used to ping. This parameter is not required to identify the target host with an IPv6 address. It is only required to identify the target host by name.
<TargetName>
Specifies the host name or IP address of the destination.