How to run iperf3

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2  Next
Author Message
nkaufman
DD-WRT User


Joined: 21 Jun 2015
Posts: 215

PostPosted: Sun Apr 12, 2020 5:16    Post subject: How to run iperf3 Reply with quote
Hello,

Have a R7800 router with dd-wrt and would like to run iperf3.

Telnet to 192.168.1.1, logged in with root and ran the following:
iperf3 -c 192.168.1.1 and got an error - see pic attached.

Am sure I'm not doing this correctly. Would appreciate if someone can point me to the right direction.
Sponsor
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 3245

PostPosted: Sun Apr 12, 2020 6:03    Post subject: Reply with quote
A server needs to be run on the other side, on your PC for example but the IP needs to be corrected.

iperf3 -s

You can also run the server on the router and client on the PC, in that case 192.168.1.1 would be correct.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1198310#1198308
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1198482#1198476
https://software.es.net/iperf/invoking.html
nkaufman
DD-WRT User


Joined: 21 Jun 2015
Posts: 215

PostPosted: Sun Apr 12, 2020 14:20    Post subject: Reply with quote
thanks.

So if I understand correctly, I telnet to router and run:
iperf3 -s

On my Windows laptop, i think I might need to install iperf client, isn't it?

If so, get client from -https://iperf.fr/en/iperf-download.php#windows-

Once I install client, I run the following in client:
iperf3 -Rc 192.168.1.1 -P 12 -t 30.

did I get everything or did i miss something?

Thanks again,
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1675
Location: Illinois Moderator

PostPosted: Sun Apr 12, 2020 15:54    Post subject: Reply with quote
*I am going to completely ignore the installation of iperf and the folder where you store it, so make sure you do that right. It's rather straight forward...

If using windows and only testing on the router, you need to open two command prompt windows:

One is to Telnet/SSH into the router.
The second command prompt is to run a client or server.

--------------------------------------------------------------------------------------

The best way to really test the performance of the router is to use two computers wired to the router. TCP testing is real-life performance testing of what you'll see when browsing, streaming, downloading, etc. UDP testing will test the overall possible performance of the router for "Unmanaged" packets. UDP testing is only good to 1gbps speeds, above that, it will consume too much cpu & ram; though at the moment I am not aware of any 10gbps routers outside the R9000 and a few other lesser known brands... TCP Vs. UDP

Running iperf on the router as a server or a client is possible, but realize you will be consuming extra cpu & ram resources to run IPERF and you won't get accurate speed results.

This is the setup you want to do for WAN-LAN performance testing:



    1. Set the static IP address of PC A(Server) by setting the IP address of PC A to 192.168.2.30, subnet to 255.255.255.0 and Default gateway as 192.168.2.20 <--The router WAN IP. PC A will plug into the WAN PORT.

    2. Set the static IP address for WAN port of the Router. Go to the main setup tab and at the top of the screen is WAN connection type, choose static IP. Make the WAN IP 192.168.2.20, subnet 255.255.255.0, and gateway is PC A - 192.168.2.30

    3. For PC B (client) make sure DHCP is enabled on the router and it will assign an IP to your PC B/client. Otherwise you can set up an IP manually if you like such as 192.168.2.33, subnet 255.255.255.0.

    Now it's time to run iperf on both PC A and PC B so open up command prompts on each device.

    4.PC A is the server so run the command "iperf3 -s" without the quote marks.

    5. PC B is the client so run the command "iperf3 -c 192.168.2.20 -b 1000M -P 4" without the quote marks. This will run a test at "gig" speed (-b 1000M) and 4 parallel streams (-P 4). This should saturate the connection and accurately measure the TCP throughput WAN to LAN. If you want to run the test in UDP mode add a "-u" to the end of the above initial code.

    5A. To reverse the client and server testing path use "-R" after the initial code in step 5. You simply keep add dash commands to the end of the initial code in step 5 to do more/less with iperf.


*You can use the same commands using the two command window method and a single computer, but realize you are not getting real-life test results.

_________________
FORUM RULES

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]47510 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800]napping
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)


Last edited by msoengineer on Wed Apr 15, 2020 21:16; edited 1 time in total
nkaufman
DD-WRT User


Joined: 21 Jun 2015
Posts: 215

PostPosted: Sun Apr 12, 2020 16:36    Post subject: Reply with quote
[quote="msoengineer"]..
One is to Telnet/SSH into the router.
The second command prompt is to run a client or server.
...
[/quote]

Thanks for the info. I found that link but instead went ahead and did the test -
telnet to router - iperf3 -s
command window for client - iperf3 -Rc 192.168.1.1

Second test:
telnet to router - iperf3 -s
command window for client - iperf3 -Rc 192.168.1.1 -P 8


The reason I only did the above is my speed when connected directly to the router is Excellent. No issues.

The only issue I have is wireless speed from the router is too low considering I have a Gb service.

Do you think that will work? If so, then i can post results

Thanks again


Last edited by nkaufman on Sun Apr 12, 2020 16:45; edited 1 time in total
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1675
Location: Illinois Moderator

PostPosted: Sun Apr 12, 2020 16:45    Post subject: Reply with quote
You will never be able to achieve gig speed on wireless unless it's a four stream device. The best you can achieve would be 400-500mbps under absolutely ideal conditions on a 2x2:2 stream device.

You can always try to run and iperf test Wi-Fi to Wi-Fi and test it yourself.

_________________
FORUM RULES

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]47510 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800]napping
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)
nkaufman
DD-WRT User


Joined: 21 Jun 2015
Posts: 215

PostPosted: Sun Apr 12, 2020 18:08    Post subject: Reply with quote
Don't think I mentioned anywhere that I want to see Gb speed on wifi.. Smile

However, my speeds are 100DL/140UL on 2.4GHz
and 250DL/150UL on 5GHz

and am trying to find out what is going on.


After telnet and running iperf3 -s, how do i come out - Ctrl-Z and exit? that gives me that I have stopped processes.

How can I make sure all processes are stopped properly?

Thanks
msoengineer
DD-WRT Guru


Joined: 21 Jan 2017
Posts: 1675
Location: Illinois Moderator

PostPosted: Sun Apr 12, 2020 20:28    Post subject: Reply with quote
use the "exit" command on the router.
_________________
FORUM RULES

TIPS/TRICKS: Best QCA Wifi Settings | Latency tricks | QoS Port priority | NEVER USE MU-MIMO |
Why to NOT use MU-MIMO | Max Wifi Pwr by Country | Linux Wifi Pwr | AC MCS & AX MCS | QCA 5Ghz chnls to use | WIFI Freq WIKI | TFTP R7800 | Don't buy AX | IPERF3 How-To

[R9000]47510 nightly (Main Router)
[EA8500]43192 & 45493 (2xOffsite)
[R7800]napping
[WDR3600]BS 44715 (Offsite)
[A7v5]BS 43038 (Offsite+spare napping)
nkaufman
DD-WRT User


Joined: 21 Jun 2015
Posts: 215

PostPosted: Sun Apr 12, 2020 22:02    Post subject: Reply with quote
[quote="msoengineer"]use the "exit" command on the router.[/quote]

Did you mean go to 192.18.1.1 -> Administration -> Commands

type "exit" and hit 'Run Command'

or something else?
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 3245

PostPosted: Sun Apr 12, 2020 22:08    Post subject: Reply with quote
No, use exit from the Telnet or SSH session. Don't use GUI.

Reboot the router if you need.
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 5597
Location: Texas

PostPosted: Sun Apr 12, 2020 22:50    Post subject: Reply with quote
^C (ctrl+c) will kill the iPerf3 server on the router or same on computer also Cool
nkaufman
DD-WRT User


Joined: 21 Jun 2015
Posts: 215

PostPosted: Sun Apr 12, 2020 22:59    Post subject: Reply with quote
Thanks all for the help. I think I have enough info to run iperf.

I'd asked earlier as well but didn't get any guidance.

When I connect my laptop directly to the router via Ethernet, I get 920/920 speed. So do I still need to connect one computer to WAN and another to LAN and speed test OR can I just do the following to test WiFi speed.

First test:
telnet to router - iperf3 -s
command window for client - iperf3 -Rc 192.168.1.1

Second test:
telnet to router - iperf3 -s
command window for client - iperf3 -Rc 192.168.1.1 -P 8

Thanks,
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 3245

PostPosted: Sun Apr 12, 2020 23:26    Post subject: Reply with quote
One is a synthetic test (PC-router) and the other is real world (PC-PC).

If you are only concerned about wifi link to test your client adapter and wifi settings, synth's enough but with possible bottleneck (resource usage).

mrjcd is right, use Ctrl+C because with Z you are just suspending into the background.
nkaufman
DD-WRT User


Joined: 21 Jun 2015
Posts: 215

PostPosted: Mon Apr 13, 2020 0:07    Post subject: Reply with quote
[quote="blkt"]One is a synthetic test (PC-router) and the other is real world (PC-PC).

If you are only concerned about wifi link to test your client adapter and wifi settings, synth's enough but with possible bottleneck (resource usage).

mrjcd is right, use Ctrl+C because with Z you are just suspending into the background.[/quote]

I think synthetic test would work for me to do an initial test.

So, if I used Ctrl-Z and pushed the process into background, how do I terminate that? Reboot router?

Thanks
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 3245

PostPosted: Mon Apr 13, 2020 0:16    Post subject: Reply with quote
You can bring it back into the foreground with the fg command.

https://duckduckgo.com/?q=ctrl%2Bz+bg+fg+jobs
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum