I'm looking for a tool to measure bandwidth that can do it in both directions. I want my server to be running on a public server, but the client to be running behind NAT. Can iperf do this?
Marc Herbert <[EMAIL PROTECTED]> wrote on 2008-04-22 20:55: > It seems that with iperf, the connecting/initiating side is always the > data sending side. Both for upstream and downstream tests. Is this really true? I would have thought this would be *the* nr 1 use of iperf: To measure download speed on a NAT'ed ADSL connection, where sockets *only* can be opened in the client->server direction. So: Is there any way to test the server->client direction on a socket opened by the client thus enabling testing from behind NAT? If not, are there any patches around that do that? Would it be tricky to do? Otherwise, does anybody know of any other tools on linux that would let me test my upload and download speeds? An alternative is to use SSH port forwarding: TERMINAL 1: ssh -L 5201:localhost:5201 -R 5202:localhost:5202 server.tld iperf -s -p 5201 TERMINAL 2: iperf -c localhost -r -p 5201 -L 5202 Now of course all traffic is running inside ssh tunnels. Would that give meaningful results? What should I keep in mind when interpreting these results (that happen to be "roughly" what I was expecting). It is a *mess* to automate this and kill the server process correctly at the right time... Anybody done this successfully? (A script suggestion at end of this mail) Peter P.S.: Sorry if the message doesn't show up threaded properly. I just joined this list and thus don't have the original message. I just cut'n'pasted the title. <code filename="iperf-ssh"> #!/bin/bash server=$1 # Ok, so the port numbers are hardcoded for now # Remove the >/dev/null 2>&1 from the line below if you # experience problems ssh -L 5201:localhost:5201 -R 5202:localhost:5202 $server iperf -s -p 5201 >/dev/null 2>&1 & # This is the pid of ssh, not remote pid for iperf... # pid=$! # echo "pid" $pid # Let the remote iperf process start up properly sleep 5 iperf -c localhost -r -p 5201 -L 5202 # This would only kill the ssh process. If we kill ssh, iperf is still # left # running on remote host. Aaarhhh - that doesn't work # kill $pid # Instead, ssh to $server and kill all iperf processes. Yes it is a # mess, but # there is no easy way to figure out the right process ID of the server # process. ssh $server killall iperf </code> -- Peter Valdemar Mørch http://www.morch.com ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Iperf-users mailing list Iperf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iperf-users