How iperf calculates network statistics

iperf is a great tool for measuring network statistics such as loss, bandwidth, and jitter. I used it a lot. But I'm just curious how he calculates these statistics. For bandwidth, it can simply measure the number of bytes received over a given period of time; For jitter, it can simply measure the packet arrival time. But, for UDP loss, how can it calculate. I assume that he designed his payload on purpose by entering serial numbers. In this way, the server can predict which packets are lost. Does anyone know what the contents of the iperf packet payload are?

Another thing is that at the end of the connection, the iperf client (sender) will receive a server report (which has statistics). What port number is sent to this report? Does this report use TCP or UDP? I cannot capture it using tcpdump.

I tried to find answers to my questions on the Internet. But I can only find how to use iperf. It seems that not a single document / site explains how iperf WORK works. Can someone give some idea or point out some documents?

+2
source share
2 answers

I'm not an iperf developer, but looking at the source code, it was pretty easy to find the place where the number of packets is copied to the udp message, look here for the count_pack: https://github.com/esnet/iperf/blob/master/src/iperf_udp. c

0

, tcpdumps iperf3. iperf3.

UDP iperf ( iperf pcount) . , .

, , D_current. | D_current - D_previous | ( ), .

, pcount pcount, pcount .

, iperf udp ( -u ) tcp, iperf, TCP-. TCP- , , , , .

iperf2 , TCP-.

+2

All Articles