Help with UDP Iperf server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with UDP Iperf server

antonio
Hi all,

I am developing a small UDP Iperf server. I am able to connect to it and get
measurements.
However,  I am unable to detect, when the  client intends to end the
connection. I need it because, I intend to supply
-d option at the client side, which enables bidirectional measurement.

From the example in apps/ there is a structure
lwiperf_settings_t; which states /** This is the Iperf settings struct sent
from the client */
I print the field flags and are always zero.

All hints are welcome.


LOG
fw$ iperf -c 172.28.49.204 -u -t 100 -i 5 -b 10m

------------------------------------------------------------
Client connecting to 172.28.49.204, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 172.28.49.37 port 44159 connected with 172.28.49.204 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3]  5.0-10.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3] 10.0-15.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3] 15.0-20.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3] 20.0-25.0 sec  5.96 MBytes  10.0 Mbits/se
..........
[  3]  0.0-100.0 sec   119 MBytes  10.0 Mbits/sec
[  3] Sent 85035 datagrams
[  3] WARNING: did not receive ack of last datagram after 10 tries.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-devel-f11621.html

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help with UDP Iperf server

Dirk Ziegelmeier-2
are you aware that UDP is a connectionless protocol? So there is no possibility to detect an "end of the connection" as for TCP.

Dirk


On Mon, Sep 24, 2018 at 5:32 PM antonio <[hidden email]> wrote:
Hi all,

I am developing a small UDP Iperf server. I am able to connect to it and get
measurements.
However,  I am unable to detect, when the  client intends to end the
connection. I need it because, I intend to supply
-d option at the client side, which enables bidirectional measurement.

From the example in apps/ there is a structure
lwiperf_settings_t; which states /** This is the Iperf settings struct sent
from the client */
I print the field flags and are always zero.

All hints are welcome.


LOG
fw$ iperf -c 172.28.49.204 -u -t 100 -i 5 -b 10m

------------------------------------------------------------
Client connecting to 172.28.49.204, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  208 KByte (default)
------------------------------------------------------------
[  3] local 172.28.49.37 port 44159 connected with 172.28.49.204 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 5.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3]  5.0-10.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3] 10.0-15.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3] 15.0-20.0 sec  5.96 MBytes  10.0 Mbits/sec
[  3] 20.0-25.0 sec  5.96 MBytes  10.0 Mbits/se
..........
[  3]  0.0-100.0 sec   119 MBytes  10.0 Mbits/sec
[  3] Sent 85035 datagrams
[  3] WARNING: did not receive ack of last datagram after 10 tries.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-devel-f11621.html

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help with UDP Iperf server

goldsimon@gmx.de
In reply to this post by antonio
On 24.09.2018 17:32, antonio wrote:
> I am developing a small UDP Iperf server. I am able to connect to it and get
> measurements.
> However,  I am unable to detect, when the  client intends to end the
> connection. I need it because, I intend to supply
> -d option at the client side, which enables bidirectional measurement.

As Dirk already wrote, UDP is connectionless. Being like that, the
application protocol (UDP payload) has to report connection closure.
Have you bothered a) checking iPerf docs or b) reverse engineering its
protocol with wireshark?

A quick look at a wireshark dump shows that this seems to be the case
for iPerf over UDP, too. But also, the protocol seems to be at least a
little different to the TCP version.

Simon

_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel