File: inetutils.info, Node: Ping options, Next: Fault isolation, Up: ping invocation 7.1 Command line options ======================== Selection of packet type is handled by these first options: '--address' Send ICMP_ADDRESS packets, thus requesting the address netmask in use by the targetted host. '--echo' Send ICMP_ECHO requests. This is the default action. '--mask' Identical to '--address'. '--timestamp' Send ICMP_TIMESTAMP packets, thereby requesting a timed response from the targetted host. In successful cases three time values are returned. All are expected to state the number of milliseconds since midnight UTC. The first of these, 'icmp_otime', contains the original time of sending the request. Then comes 'icmp_rtime', the time of reception by the target, and finally, 'icmp_ttime', the time of transmitting an answer back to the originator. '-t TYPE' '--type=TYPE' Send TYPE packets. Accepted values are 'address', 'echo', 'mask', and 'timestamp'. The following options are available for all packet types: '-c N' '--count=N' Stop after sending and receiving answers to a total of N packets. '-d' '--debug' Set the SO_DEBUG option on the socket being used. '-i N' '--interval=N' Wait N seconds until sending next packet. The default is to wait for one second between packets. This option is incompatible with the option '-f'. '-n' '--numeric' Numeric output only. No attempt will be made to resolve symbolic names for host addresses. '-r' '--ignore-routing' 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'). '-T NUM' '--tos=NUM' Set type-of-service, TOS field, to NUM on transmitted packets. '--ttl=N' Set the specified number N as value of time-to-live when transmitting packets. Acceptable values are 1 to 255, inclusive. '-v' '--verbose' Produce more verbose output, giving more statistics. '-w N' '--timeout=N' Stop after N seconds. '-W N' '--linger=N' Maximum number of seconds N to wait for a response. Finally, these last options are relevant only for sending echo requests, allowing many variations in order to detect various peculiarities of the targeted host, or the intermediary routers for that matter. '-f' '--flood' Flood ping. Outputs packets as fast as they come back or one hundred times per second, whichever is more. For every ECHO_REQUEST packet sent, a period '.' is printed, while for every ECHO_REPLY received in reply, 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 network and should be used with caution. '--ip-timestamp=FLAG' Include IP option Timestamp in transmitted packets. The value FLAG is either 'tsonly', which only records up to nine time stamps, or 'tsaddr', which records IP addresses as well as time stamps, but for at most four hosts. '-l N' '--preload=N' If N is specified, ping sends that many packets as fast as possible before falling into its normal mode of operation. '-p PAT' '--pattern=PAT' 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' Do not print timing for each transmitted packet. '-R' '--route' Record route. Includes the 'RECORD_ROUTE' field 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. '-s N' '--size=N' Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes, taking the 8 bytes of ICMP header data into account.