Ping

This diagnostic command verifies connections to one or more remote hosts.

Syntax

ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count]
[[-j host-list] | [-k host-list]] [-w timeout] destination-list

Parameters

-t

Pings the specified host until interrupted.

-a

Specifies not to resolve addresses to host names.

-n count

Sends the number of echo packets specified by count. The default is 4.

-l length

Sends echo packets containing the amount of data specified by length. The default is 64 bytes; the maximum is 8192.

-f

Sends a Do Not Fragment flag in the packet. The packet will not be fragmented by gateways on the route.

-i ttl

Sets the Time To Live field to the value specified by ttl.

-v tos

Sets the Type Of Service field to the value specified by tos.

-r count

Records the route of the outgoing packet and the returning packet in the Record Route field. A minimum of 1 to a maximum of 9 hosts must be specified by count.

-s count

Specifies the time stamp for the number of hops specified by count.

-j host-list

Routes packets by means of the list of hosts specified by host-list. Consecutive hosts may be separated by intermediate gateways (loose source routed). The maximum number allowed by IP is 9.

-k host-list

Routes packets by means of the list of hosts specified by host-list. Consecutive hosts may not be separated by intermediate gateways (strict source routed). The maximum number allowed by IP is 9.

-w timeout

Specifies a time-out interval in milliseconds.

destination-list

Specifies the remote hosts to ping.

Note on Ping

The ping command verifies connections to remote host or hosts, by sending Internet Control Message Protocol (ICMP) echo packets to the host and listening for echo reply packets. The ping command waits for up to 1 second for each packet sent and prints the number of packets transmitted and received. Each received packet is validated against the transmitted message. By default, four echo packets containing 64 bytes of data (a periodic uppercase sequence of alphabetic characters) are transmitted.

You can use the ping utility to test both the host name and the IP address of the host. If the IP address is verified but the host name is not, you may have a name resolution problem. In this case, be sure that the host name you are querying is in either the local HOSTS file or in the DNS database.

The following shows sample output for ping:


C:\>ping ds.internic.net
Pinging ds.internic.net [192.20.239.132] with 32 bytes of data:
Reply from 192.20.239.132: bytes=32 time=101ms TTL=243 Reply from 192.20.239.132: bytes=32 time=100ms TTL=243 Reply from 192.20.239.132: bytes=32 time=120ms TTL=243 Reply from 192.20.239.132: bytes=32 time=120ms TTL=243