Ping can provide statistics about latencies.
To measure latencies, we will use ping [2, 1], a tool that sends (one or more)
ICMP Echo Request messages to an IP address and waits for receiving (one or more)
ICMP Echo Reply messages generated by the ( OS of that) host, measuring the so
called RTT (Round-Trip Time). For example, in the Figure 1 are described the
different time components in which a RTT can be decomposed. In this figure, \(t_t\)
stands for transmission time, and \(t_p\) (again) for propagation time. A simple
link (two wires, for example) using TDM (Time-Domain Multiplexing) has
been supposed. For this reason, the propagation and transmission times are
identical in both directions. Notice that if the payload of the ping message has
only 64 bytes (the default value in most ping implementations) and the
bit rate of the link is high, then \(t_p\gg t_t.\) In a LAN, for example, it also holds that
Usually, to determine the throughput, we need to use a tool such as iPerf to measure the link capacity between two end-points (of different hosts) in the Internet. Unfortunately, this procedure implies that we must have access to both hosts to install and run this program, privileges that are not always available.
Alternatively, we can estimate the link throughput using ping. However, it is important to realize that ping has been designed to measure latencies, not bit-rates, and that, for this reason, we will only be able to estimate throughputs, rougtly.
Said that, the transmission bitrate available between two directly reachable IP devices can be found with
where \(B\) is the number of bits sent in a ping payload,
and
an equation that can be determined by revisiting the ping timeline
shown in the Figure 1 and the Eq. 1. In this expression, \(\text {RTT}_{\text {max}}\) represents the
average1 RTT measured
when we send the maximum2
number of bytes in the payload of the ping, and
where \(\text {RTT}_{\text {min}}\) presents the minimum3 RTT measurement when we send the minimum4 payload.
Therefore, to estimate \(b\) for the near future, we must perform the following steps:
If the devices cannot be ping-ed, and supposing that there is only one point in the communication link that is filtering the ICMP Echo Request traffic in each direction, then we can compute the total RTT as the sum of the RTTs from the devices that we want to connect (where the InterCom is it supposed to be run) to the filter (possiblely, one of your home routers).
You can use www.meter.net to test your pings.
[1] Behrouz Forouzan. Introduction to Data Communications and Networking. McGraw-Hill, 2007.
[2] James F. Kurose and Keith W. Ross. Computer Networking: A Top-Down Approach Featuring the Internet. Pearson, 2013.
1Remember that ping can generate a number of time measurements.
2We should use a payload as large as possible (ideally, an infinite number of bytes), in order to make \(t_t\) a significant amount of time, which is easy to measure
3Again, remember that ping returns a collection of RTTs, a we should use the minimun beause the latency of the link should be a constant and the congestion always increases this value.
4If the payload of the ping is small enough (\(0\) bytes ideally), it would happen that \(t_t=0\).
5The minimal payload for a ping message can be 0, but depending on the implementation of ping you might have to use a larger value.