This diagnostic command verifies connections to one or more remote computers.
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
Resolves 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 timestamp for the number of hops specified by count.
-j host-list
Routes packets via the list of hosts specified by host-list. Consecutive hosts can be separated by intermediate gateways (loose source routed). The maximum number allowed by IP is 9.
-k host-list
Routes packets via the list of hosts specified by host-list. Consecutive hosts cannot be separated by intermediate gateways (strict source routed). The maximum number allowed by IP is 9.
-w timeout
Specifies a timeout interval in milliseconds.
destination-list
Specifies the remote hosts to ping.
Notes
The ping command verifies connections to remote hosts by sending ICMP echo packets to the host and listening for echo reply packets. Ping 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 sequence of uppercase 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 might 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: