2ping – A bi-directional ping utility
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.
To use 2ping, start a listener on a known stable network host. The relative network stability of the 2ping listener host should not be in question, because while 2ping can determine whether packet loss is occurring inbound or outbound relative to an endpoint, that will not help 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 to connect to the listener. The ends will begin pinging each other and displaying network statistics. If packet loss occurs, 2ping will wait a few seconds (default 10, configurable with -w) before comparing notes between the two endpoints to determine which direction the packet loss is occurring.
To quit 2ping on the client or listener ends, enter ^C, and a list of statistics will be displayed. To get a short inline display of statistics without quitting, send the process a QUIT signal (yes, that's the opposite of what you would think, but it's in line with the normal ping utility).
Install 2ping on ubuntu
Open the terminal and run the following command
sudo apt-get install 2ping
2ping [ options ] --listen | host/IP
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.
You can refer 2ping man page for more detailed options