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

Resolve addresses to hostnames.

-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.

Note

The ping command verifies connections to remote host or 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 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 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:



/>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