unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 ping(1M)							    ping(1M)




 NAME
      ping - send ICMP Echo Request packets to network host

 SYNOPSIS
      ping [-oprv] [-i address] [-t ttl] host [-n count]

      ping [-oprv] [-i address] [-t ttl] host packet-size [ [-n] count]

 DESCRIPTION
      The ping command sends ICMP Echo Request (ECHO_REQUEST) packets to
      host once per second.  Each packet that is echoed back via an ICMP
      Echo Response packet is written to the standard output, including
      round-trip time.

      ICMP Echo Request datagrams ("pings") have an IP and ICMP header,
      followed by a struct timeval (see gettimeofday(2)) and an arbitrary
      number of "pad" bytes used to fill out the packet.  The default
      datagram length is 64 bytes, but this can be changed by using the
      packet-size option.

    Options
      The following options and parameters are recognized by ping:

	   -i address  If host is a multicast address, send multicast
		       datagrams from the interface with the local IP
		       address specified by address in ``dot'' notation (see
		       inet(3N)).  If the -i option is not specified,
		       multicast datagrams are sent from the default
		       interface, which is determined by the route
		       configuration.

	   -o	       Insert an IP Record Route option in outgoing packets,
		       summarizing routes taken when the command terminates.

		       It may not be possible to get the round-trip path if
		       some hosts on the route taken do not implement the IP
		       Record Route option.  A maximum of 9 Internet
		       addresses can be recorded due to the maximum length
		       of the IP option area.

	   -p	       The new Path MTU information is displayed when a ICMP
		       "Datagram Too Big" message is received from a
		       gateway. The -p option must be used in conjunction
		       with a large packetsize and with the -v 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-connected network, an error is returned.
		       This option can be used to ping the local system
		       through an interface that has no route through it,
		       such as after the interface was dropped by gated (see



 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 ping(1M)							    ping(1M)




		       gated(1M)).

	   -t ttl      If host is a multicast address, set the time-to-live
		       field in the multicast datagram to ttl.	This
		       controls the scope of the multicast datagrams by
		       specifying the maximum number of external systems
		       through which the datagram can be forwarded.

		       If ttl is zero, the datagram is restricted to the
		       local system.  If ttl is one, the datagram is
		       restricted to systems that have an interface on the
		       network directly connected to the interface specified
		       by the -i option.  If ttl is two, the datagram can
		       forwarded through at most one multicast router; and
		       so forth.  Range: zero to 255.  The default value is
		       1.

	   -v	       Verbose output.	Show ICMP packets other than Echo
		       Responses that are received.

	   host	       Destination to which the ICMP Echo Requests are sent.
		       host can be a hostname or an Internet address.  All
		       symbolic names specified for host are looked up by
		       using gethostbyname() (see gethostent(3N)).  If host
		       is an Internet address, it must be in "dot" notation
		       (see inet(3N)).

		       If a system does not respond as expected, the route
		       might be configured incorrectly on the local or
		       remote system or on an intermediate gateway, or there
		       might be some other network failure.  Normally, host
		       is the address assigned to a local or remote network
		       interface.

		       If host is a broadcast address, all systems that
		       receive the broadcast should respond.  Normally,
		       these are only systems that have a network interface
		       on the same network as the local interface sending
		       the ICMP Echo Request.

		       If host is a multicast address, only systems that
		       have joined the multicast group should respond.
		       These may be distant systems if the -t option is
		       specified, and there is a multicast router on the
		       network directly connected to the interface specified
		       by the -i option.

	   packet-size The size of the transmitted packet, in bytes.  By
		       default (when packet-size is not specified), the size
		       of transmitted packets is 64 bytes.  The minimum
		       value allowed for packet-size is 8 bytes, and the



 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000






 ping(1M)							    ping(1M)




		       maximum is 4095 bytes.  If packet-size is smaller
		       than 16 bytes, there is not enough room for timing
		       information.  In that case, the round-trip times are
		       not displayed.

	   count       The number of packets ping will transmit before
		       terminating.  Range: zero to 2147483647.	 The default
		       is zero, in which case ping sends packets until
		       interrupted.

      When using ping for fault isolation, first specify a local address for
      host to verify that the local network interface is working correctly.
      Then specify host and gateway addresses further and further away to
      determine the point of failure.  ping sends one datagram per second,
      and it normally writes one line of output for every ICMP Echo Response
      that is received.	 No output is produced if there are no responses.
      If an optional count is given, only the specified number of requests
      is sent.	Round-trip times and packet loss statistics are computed.
      When all responses have been received or the command times out (if the
      count option is specified), or if the command is terminated with a
      SIGINT, a brief summary is displayed.

      This command is intended for use in testing, managing and measuring
      network performance.  It should be used primarily to isolate network
      failures.	 Because of the load it could impose on the network, it is
      considered discourteous to use ping unnecessarily during normal
      operations or from automated scripts.

 AUTHOR
      ping was developed in the Public Domain.

 FILES
      /etc/hosts

 SEE ALSO
      gethostent(3N), inet(3N).


















 Hewlett-Packard Company	    - 3 -   HP-UX Release 11i: November 2000