MAN page from OpenSuSE 2ping-4.1-lp150.1.2.noarch.rpm
Section: 2ping (1)
2ping - A bi-directional ping utility
2ping [I]options]] I]--listen] | host/IP
C]2ping] is a bi-directional ping utility.It uses 3-way pings (akin to TCP SYN, SYN/ACK, ACK) andafter-the-fact state comparison between a 2ping listener and a 2pingclient to determine which direction packet loss occurs.
To use 2ping, start a listener on a known stable network host.The relative network stability of the 2ping listener host should not bein question, because while 2ping can determine whether packet loss isoccurring inbound or outbound relative to an endpoint, that will nothelp you determine the cause if both of the endpoints are in question.
Once the listener is started, start 2ping in client mode and tell it toconnect to the listener.The ends will begin pinging each other and displaying networkstatistics.If packet loss occurs, 2ping will wait a few seconds (default 10,configurable with I]--inquire-wait]) before comparing notesbetween the two endpoints to determine which direction the packet lossis occurring.
To quit 2ping on the client or listener ends, enter ^C, and a list ofstatistics will be displayed.To get a short inline display of statistics without quitting, enter ^\or send the process a QUIT signal.
C]ping]-compatible options (long option names areC]2ping]-specific):
- --audible, -a
- Audible ping.
- --adaptive, -A
- Adaptive ping.A new client ping request is sent as soon as a client ping response isreceived.If a ping response is not received within the interval period, a newping request is sent.On networks with low rtt this mode is essentially equivalent to floodmode.
- --count=I]count], -c I]count]
- Stop after sending I]count] ping requests.
- --flood, -f
- Flood ping.For every ping sent a period "." is printed, while for ever pingreceived a backspace is printed.This provides a rapid display of how many pings are being dropped.If interval is not given, it sets interval to zero and outputs pings asfast as they come back or one hundred times per second, whichever ismore.
C]2ping]-specific notes: Detected outbound/inbound loss responsesare printed as ">" and "<", respectively.Receive errors are printed as "E".Due to the asynchronous nature of C]2ping], successful responses(backspaces) may overwrite these loss and error characters.
- --interval=I]interval], -i I]interval]
- Wait I]interval] seconds between sending each ping.The default is to wait for one second between each ping normally, or notto wait in flood mode.
- --interface-address=I]address], -I I]address]
- Set source IP address.When in listener mode, this option may be specified multiple to bind tomultiple IP addresses.When in client mode, this option may only be specified once, and alloutbound pings will be bound to this source IP.
C]2ping]-specific notes: This option only takes an IP address,not a device name.Note that in listener mode, if the machine has an interface withmultiple IP addresses and an request comes in via a sub IP, the replystill leaves via the interface[aq]s main IP.So either this option or I]--all-interfaces] must be used ifyou would like to respond via an interface[aq]s sub-IP.
- --preload=I]count], -l I]count]
- If specified, C]2ping] sends that many packets not waiting forreply.
- --pattern=I]hex_bytes], -p I]hex_bytes]
- You may specify up to 16 "pad" bytes to fill out the packets you send.This is useful for diagnosing data-dependent problems in a network.For example, I]--pattern=ff] will cause the sent packet pad areato be filled with all ones.
C]2ping]-specific notes: This pads the portion of the packet thatdoes not contain the active payload data.If the active payload data is larger than the minimum packet size(I]--min-packet-size]), no padding will be sent.
- --quiet, -q
- Quiet output.Nothing is displayed except the summary lines at startup time and whenfinished.
- --packetsize-compat=I]bytes], -s I]bytes]
- C]ping] compatibility; this will setI]--min-packet-size] to this plus 8 bytes.
- --verbose, -v
- Verbose output.In C]2ping], this prints decodes of packets that are sent andreceived.
- --version, -V
- Show version and exit.
- --deadline=I]seconds], -w I]seconds]
- Specify a timeout, in seconds, before C]2ping] exits regardless ofhow many pings have been sent or received.Due to blocking, this may occur up to one second after the deadlinespecified.
- --help, -h
- Print a synposis and exit.
- --ipv4, -4
- Limit binds to IPv4.In client mode, this forces resolution of dual-homed hostnames to theIPv4 address.(Without I]--ipv4] or I]--ipv6], the first result willbe used as specified by your operating system, usually the AAAA addresson IPv6-routable machines, or the A address on IPv4-only machines.) Inlistener mode, this filters out any non-IPv4I]--interface-address] binds, either through hostnameresolution or explicit passing.
- --ipv6, -6
- Limit binds to IPv6.In client mode, this forces resolution of dual-homed hostnames to theIPv6 address.(Without I]-4] or I]-6], the first result will be used asspecified by your operating system, usually the AAAA address onIPv6-routable machines, or the A address on IPv4-only machines.) Inlistener mode, this filters out any non-IPv6I]--interface-address] binds, either through hostnameresolution or explicit passing.
- In listener mode, listen on all possible interface addresses.If used, this will override any addresses given byI]--interface-address].This functionality requires the netifaces module to be installed.
- Set a shared key, send cryptographic hashes with each packet, andrequire cryptographic hashes from peer packets signed with the sameshared key.
- When I]--auth] is used, specify the digest type to compute thecryptographic hash.Valid options are C]hmac-md5] (default), C]hmac-sha1],C]hmac-sha256] and C]hmac-sha512].
- Print (lots of) debugging information.
- Set a shared key, encrypt 2ping packets, and require encrypted packetsfrom peers encrypted with the same shared key.Requires the PyCrypto module.
- When I]--encrypt] is used, specify the method used to encryptpackets.Valid options are C]hkdf-aes256-cbc] (default).
- Simulate corruption of incoming packets, with a I]percent]probability each bit will be flipped.After fuzzing, the packet checksum will be recalculated, and then thechecksum itself will be fuzzed (but at a lower probability).
- Wait at least I]secs] seconds before inquiring about a lostpacket.Default is 10 seconds.UDP packets can arrive delayed or out of order, so it is best to give itsome time before inquiring about a lost packet.
- Start as a listener.The listener will not send out ping requests at regular intervals, andwill instead wait for the far end to initiate ping requests.A listener is required as the remote end for a client.
- Set the minimum total payload size to I]min] bytes, default 128.If the payload is smaller than I]min] bytes, padding will be addedto the end of the packet.
- Set the maximum total payload size to I]max] bytes, default 512,absolute minimum 64.If the payload is larger than I]max] bytes, information will berearranged and sent in future packets when possible.
- Produce output suitable for use in a Nagios check.If I]--count] is not specified, defaults to 5 pings.A warning condition (exit code 1) will be returned if average RTTexceeds I]wrta] or ping loss exceeds I]wloss%].A critical condition (exit code 2) will be returned if average RTTexceeds I]crta] or ping loss exceeds I]closs%].
- Do not perform 3-way pings.Used most often when combined with I]--listen], as the listeneris usually the one to determine whether a ping reply should become a3-way ping.
Strictly speaking, a 3-way ping is not necessary for determiningdirectional packet loss between the client and the listener.However, the extra leg of the 3-way ping allows for extra chances todetermine packet loss more efficiently.Also, with 3-way ping disabled, the listener will receive no clientperformance indicators, nor will the listener be able to determinedirectional packet loss that it detects.
- When sending replies, 2ping will try to match the packet size of thereceived packet by adding padding if necessary, but will not exceedI]--max-packet-size].I]--no-match-packet-size] disabled this behavior, alwayssetting the minimum to I]--min-packet-size].
- Do not send the current running version of 2ping with each packet.
- Send arbitrary notice I]text] with each packet.If the remote peer supports it, this may be displayed to the user.
- Simulate random packet loss outbound and inbound.For example, I]25:10] means a 25% chance of not sending a packet,and a 10% chance of ignoring a received packet.A single number without colon separation means use the same percentagefor both outbound and inbound.
- Use UDP port I]port], either a numeric port number of a servicename string.With I]--listen], this is the port to bind as, otherwise this isthe port to send to.Default is UDP port 15998.
- Send a monotonic clock value with each packet.Peer time (if sent by the peer) can be viewed with I]--verbose].Only supported if the system is capable of generating a monotonic clock.
- Send random data to the peer, up to I]bytes].The number of bytes will be limited by other factors, up toI]--max-packet-size].If this data is to be used for trusted purposes, it should be combinedwith I]--auth] for HMAC authentication.
- Send the host time (wall clock) with each packet.Peer time (if sent by the peer) can be viewed with I]--verbose].
- In client mode, causes hostnames to be looked up via DNS SRV records.If the SRV query returns multiple record targets, they will all bepinged in parallel; priority and weight are not considered.The record[aq]s port will be used instead of I]--port].This functionality requires the dnspython module to be installed.
- Print a line of brief current statistics every I]interval]seconds.The same line can be printed on demand by entering ^\ or sending theQUIT signal to the 2ping process.
None known, many assumed.
C]2ping] was written by Ryan Finnie <ryanAATTfinnie.org>.
This document was created byman2html,using the manual pages.