next up previous contents index
Next: server Up: Verklarende woordenlijst Previous: PHP & mod_php

     
ping

PING(8)                  UNIX System Manager's Manual                  PING(8)

NAME
     ping - send ICMP ECHO_REQUEST packets to network hosts

SYNOPSIS
     ping [-dfnqrvR] [-c count] [-i wait] [-l preload] [-p pattern] [-s
          packetsize]

DESCRIPTION
     Ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit
     an ICMP ECHO_RESPONSE from a host or gateway.  ECHO_REQUEST datagrams
     (``pings'') have an IP and ICMP header, followed by a ``struct timeval''
     and then an arbitrary number of ``pad'' bytes used to fill out the pack-
     et.  The options are as follows: Other options are:

     -c count
             Stop after sending (and receiving) count ECHO_RESPONSE packets.

     -d      Set the SO_DEBUG option on the socket being used.

     -f      Flood ping.  Outputs packets as fast as they come back or one
             hundred times per second, whichever is more.  For every
             ECHO_REQUEST sent a period ``.'' is printed, while for ever
             ECHO_REPLY received a backspace is printed.  This provides a
             rapid display of how many packets are being dropped.  Only the
             super-user may use this option.  This can be very hard on a net-
             work and should be used with caution.

     -i wait
             Wait wait seconds between sending each packet. The default is to
             wait for one second between each packet.  This option is incom-
             patible with the -f option.

     -l preload
             If preload is specified, ping sends that many packets as fast as
             possible before falling into its normal mode of behavior.  Only
             the super-user may use this option.

     -n      Numeric output only.  No attempt will be made to lookup symbolic
             names for host addresses.

     -p pattern
             You may specify up to 16 ``pad'' bytes to fill out the packet you
             send.  This is useful for diagnosing data-dependent problems in a
             network.  For example, ``-p ff'' will cause the sent packet to be
             filled with all ones.

     -q      Quiet output.  Nothing is displayed except the summary lines at
             startup time and when finished.

     -R      Record route.  Includes the RECORD_ROUTE option in the
             ECHO_REQUEST packet and displays the route buffer on returned
             packets.  Note that the IP header is only large enough for nine
             such routes.  Many hosts ignore or discard this option.

     -r      Bypass the normal routing tables and send directly to a host on
             an attached network.  If the host is not on a directly-attached
             network, an error is returned.  This option can be used to ping a
             local host through an interface that has no route through it
             (e.g., after the interface was dropped by routed(8)).

     -s packetsize
             Specifies the number of data bytes to be sent.  The default is
             56, which translates into 64 ICMP data bytes when combined with
             the 8 bytes of ICMP header data.

     -v      Verbose output.  ICMP packets other than ECHO_RESPONSE that are
             received are listed.

     When using ping for fault isolation, it should first be run on the local
     host, to verify that the local network interface is up and running.
     Then, hosts and gateways further and further away should be ``pinged''.
     Round-trip times and packet loss statistics are computed.  If duplicate
     packets are received, they are not included in the packet loss calcula-
     tion, although the round trip time of these packets is used in calculat-
     ing the minimum/average/maximum round-trip time numbers.  When the speci-
     fied number of packets have been sent (and received) or if the program is
     terminated with a SIGINT, a brief summary is displayed.

     If ping does not receive any reply packets at all it will exit with code
     1.  On error it exits with code 2. Otherwise it exits with code 0. This
     makes it possible to use the exit code to see if a host is alive or not.

     This program is intended for use in network testing, measurement and man-
     agement.  Because of the load it can impose on the network, it is unwise
     to use ping during normal operations or from automated scripts.




1999-06-26