SSH disconnecting when doing iperf3 test

Started by Nikotine, October 28, 2021, 04:24:29 PM

Previous topic - Next topic
I want to do some iperf testing before and after changing some tunables, but I get disconnected from SSH when running iperf3. Am I using the wrong command?

root@opnsense:~ # iperf3 -c ping.online.net -p 5200 -t 30 -i 10 -u -b 1000M
Connecting to host ping.online.net, port 5200
[  5] local 192.168.0.100 port 9802 connected to 62.210.18.40 port 5200
[ ID] Interval           Transfer     Bitrate         Total Datagrams
[  5]   0.00-10.00  sec   492 MBytes   413 Mbits/sec  358888
[  5]  10.00-20.00  sec   562 MBytes   471 Mbits/sec  404794

Network error: Software caused connection abort

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Session stopped
    - Press <return> to exit tab
    - Press R to restart session
    - Press S to save terminal output to file


Should I be using UDP (-u) or TCP to get the best idea of my WAN speed?
My ISP promises 300 Mbps down and 20 Mbps up, so initial results (before it disconnects...) seem promising?

I have these entries in the log:
2021-10-28T16:21:47 sshd[49126] Timeout, client not responding from user root 10.25.9.10 port 53750
2021-10-28T16:21:17 sshd[2183] Timeout, client not responding from user root 10.25.9.10 port 53751
2021-10-28T16:08:18 sshd[62568] Timeout, client not responding from user root 10.25.9.10 port 53573
2021-10-28T16:08:09 sshd[48064] Timeout, client not responding from user root 10.25.9.10 port 53525
2021-10-28T16:07:43 sshd[29982] Timeout, client not responding from user root 10.25.9.10 port 53574
2021-10-28T16:07:39 sshd[31199] Timeout, client not responding from user root 10.25.9.10 port 53526

Ok, I think I made some rookie mistakes.
After some more reading of the iperf manpage, I believe I need the -R flag to do the connection test in reverse, with the server sending and client receiving:

root@opnsense:~ # iperf3 -c ping.online.net -p 5200 -t 30 -i 3 -R
Connecting to host ping.online.net, port 5200
Reverse mode, remote host ping.online.net is sending
[  5] local 192.168.0.100 port 10545 connected to 62.210.18.40 port 5200
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-3.00   sec  61.0 MBytes   171 Mbits/sec
[  5]   3.00-6.00   sec  79.3 MBytes   222 Mbits/sec
[  5]   6.00-9.00   sec  78.6 MBytes   220 Mbits/sec
[  5]   9.00-12.00  sec  79.0 MBytes   221 Mbits/sec
[  5]  12.00-15.00  sec  69.0 MBytes   193 Mbits/sec
[  5]  15.00-18.00  sec  74.1 MBytes   207 Mbits/sec
[  5]  18.00-21.00  sec  78.7 MBytes   220 Mbits/sec
[  5]  21.00-24.00  sec  76.0 MBytes   212 Mbits/sec
[  5]  24.00-27.00  sec  79.1 MBytes   221 Mbits/sec
[  5]  27.00-30.00  sec  77.9 MBytes   218 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-30.00  sec   757 MBytes   212 Mbits/sec    1             sender
[  5]   0.00-30.00  sec   753 MBytes   210 Mbits/sec                  receiver


This gives results that are lower than what my ISP is promising, and doesn't crash SSH either.
Not sure why it crashed when using UDP though.