6

I would like to test UDP connectivity with iperf3 but do not know how to start it in UDP server mode.

iperf3 -s only opens a TCP socket:

root@srv ~# lsof -i -P | grep iperf3
iperf3    21030            root    3u  IPv4 15606995      0t0  TCP *:5201 (LISTEN)
WoJ
  • 3,365
  • 8
  • 46
  • 75

2 Answers2

6

The syntax is a bit different for iperf3. Example 1Mbps udp test:

server side:

iperf3 -s

client side:

iperf3 -u -c client.ip.address -b 1M

What I find really interesting is the server-side doesn't start listening on the udp port until it receives the first incoming udp packet. This is weirdly unintuitive.

WoJ
  • 3,365
  • 8
  • 46
  • 75
hank
  • 76
  • 1
  • 2
1

You can open UDP socket in the port 5003 using the below command.

iperf3 -s -p 5003
RalfFriedl
  • 3,008
  • 4
  • 12
  • 17
Preash
  • 11
  • 1
  • This is the same command I used in my question. This said, I checked a client with `-u` and the UDP connection is successful. It means that both TCP and UDP ports are opened automatically. – WoJ Oct 04 '19 at 13:31