2ping is a bi-directional ping utility. It uses 3-way pings (akin to TCP SYN, SYN/ACK, ACK) and after-the-fact state comparison between a 2ping listener and a 2ping client to determine which direction packet loss occurs.
apt-get install 2pingin Debian 7.0 "wheezy" and newer
apt-get install 2pingin Ubuntu 11.04 "natty" and newer
yum install 2pingin Fedora 19 and newer
rpmbuild -ta 2ping-2.1.1.tar.gzto build and install
2ping should work on any computer with Perl 5.6.0 or later. It has been tested on Linux, FreeBSD, Mac OS X, and Windows (with Strawberry Perl).
user@alice:~$ 2ping test.2ping.net 2PING test.2ping.net (126.96.36.199): 64 to 512 bytes of data. Lost outbound packet to 188.8.131.52: ping_seq=1 64 bytes from 184.108.40.206: ping_seq=2 time=10.557 ms Lost inbound packet from 220.127.116.11: ping_seq=3 64 bytes from 18.104.22.168: ping_seq=4 time=10.527 ms ^C --- test.2ping.net 2ping statistics --- 4 pings transmitted, 2 received, 50% ping loss, time 4008ms 1 outbound ping losses (25%), 1 inbound (25%), 0 undetermined (0%) rtt min/avg/max = 10.527/10.542/10.557 ms 6 raw packets transmitted, 3 received user@alice:~$ _
Start a listener on a stable remote side by running
2ping --listen. Then on the local side, run 2ping against that host's name or IP, e.g.
2ping remotehost or
2ping 10.0.0.1. More information is available in the man page.
If you would like to quickly test 2ping against a remote listener without setting one of your own up, there are several public test listeners available.
test.2ping.net- Currently located in San Jose, California. Contains both A (IPv4) and AAAA (IPv6) records. IPv6 connectivity is native, not tunnelled.
ipv4.test.2ping.net- Same as above, but contains only A (IPv4) records.
ipv6.test.2ping.net- Same as above, but contains only AAAA (IPv6) records.
test.2ping.net runs the latest version of 2ping. The 2ping protocol is designed to be version-agnostic (that is, implementations are backwards and forwards compatible with each other), so as long as the client is at least version 1.0, it should be able to work with the latest version listener.
The following secondary servers are run by either myself or others in the community. They are not guaranteed to be running the latest version of 2ping, but as stated before, this should not matter.
|Fremont, CA, USA||Yes||Yes||Ryan Finnie|
|Dallas, Texas, USA||Yes||Yes||Finnix, sponsored by Linode|
|London, United Kingdom||Yes||Yes||Finnix, sponsored by Linode|
|Tokyo, Japan||Yes||Yes||Finnix, sponsored by Linode|
|London, United Kingdom||Yes||Yes||Finnix, sponsored by Host Virtual|
Please do not abuse the listeners. Do not flood ping (any interval faster than 0.2 seconds), ping for excessive periods, or constantly send large padded packets.
2ping development is managed with git, and is available in several locations:
Releases from 0.0.3 onward are tagged. Patches are welcome; please send to Ryan Finnie.
2ping is licensed under the GNU General Public License v2.0.
2ping, a bi-directional ping utility
Copyright (C) 2010 Ryan Finnie
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The 2ping protocol specification is an open standard, and its text is also licensed under the GPLv2; see the protocol specification document for details.
2ping and the 2ping protocol were written by Ryan Finnie.