PING(8)                                                   PING(8)

     NAME
          ping, gping, traceroute, hogports - probe the Internet

     SYNOPSIS
          ip/ping [ -6aflqr ] [ -i interval ] [ -n count ] [ -s size ]
          [ -w waittime ] destination

          ip/gping [ -r ] [ -l ] [ -i interval ] destination [
          destination ... ]

          ip/traceroute [ -dn ][ -a n ][ -h nbuck ][ -t sttl ] dest

          ip/hogports [mtpt/]proto!address!startport[-endport]

     DESCRIPTION
          Ping sends ICMP echo request messages to a system.  It can
          be used to determine the network delay and whether or not
          the destination is up.  By default, a line is written to
          standard output for each request.  If a reply is received
          the line contains the request id (starting at 0 and incre-
          menting), the round trip time for this request, the average
          round trip time, and the time to live in the reply packet.
          If no reply is received the line contains the word "lost",
          the request id, and the average round trip time.

          If a reply is received for each request, ping returns suc-
          cessfully. Otherwise it returns an error status of "lost
          messages".

          The options are:

          6    force the use of IPv6's ICMP, icmpv6, instead of IPv4's
               ICMP.  Ping tries to determine which version of IP to
               use automatically.

          a    adds the IP source and destination addresses to each
               report.

          f    send messages as fast as possible (flood).

          i    sets the time between messages to be interval millisec-
               onds, default 1000 ms.

          l    causes only lost messages to be reported.

          n    requests that a total of count messages be sent,
               default 32.

          q    suppresses any output (i.e. be quiet).

     Page 1                       Plan 9            (printed 11/18/24)

     PING(8)                                                   PING(8)

          r    randomizes the delay with a minimum extra delay of 0 ms
               and a maximum extra delay of the selected interval.

          s    sets the length of the message to be size bytes, ICMP
               header included.  The size cannot be smaller than 32 or
               larger than 8192.  The default is 64.

          w    sets the additional time in milliseconds to wait after
               all packets are sent.

          Gping is a ping with a graphical display.  It presents sepa-
          rate graphs for each destination specified.

          The options are:

          r    display round trip time in seconds.  This is the
               default.

          l    display percentage of lost messages.  A message is con-
               sidered lost if not replied to in 10 seconds.  The per-
               centage is an exponentially weighted average.

          i    sets the time between messages to be interval millisec-
               onds, default 5000 ms.

          Graphs can be dropped and added using the button 3 menu.
          Clicking button 1 on a datapoint displays the value of the
          datapoint and the time it was recorded.

          Traceroute displays the IP addresses and average round trip
          times to all routers between the machine it is run on and
          dest. It does this by sending packets to dest with increas-
          ing times to live (TTL) in their headers.  Each router that
          a packet expires at replies with an ICMP warning message.
          The options are:

          d    print debugging to standard error

          n    just print out IP numbers, don't try to look up the
               names of the routers.

          a    make n attempts at each TTL value (default 3).

          t    set the starting TTL value to sttl (default 1).

          h    print out a histogram of times from request to response
               at each TTL value.  The histogram contains nbuck buck-
               ets.

          Hogports announces on a range of ports to keep them from
          other processes.  For example, to keep anyone from making a
          vncserver visible on the network mounted at /net.alt:

     Page 2                       Plan 9            (printed 11/18/24)

     PING(8)                                                   PING(8)

               ip/hogports /net.alt/tcp!*!5900-5950

     SOURCE
          /sys/src/cmd/ip/ping.c
          /sys/src/cmd/ip/gping.c
          /sys/src/cmd/ip/traceroute.c
          /sys/src/cmd/ip/hogports.c

     SEE ALSO
          ip(3)

     Page 3                       Plan 9            (printed 11/18/24)