Benchmarking multiple network interfaces at once in Linux with iperf3
Recently, I've been working on a Pi router build with multiple 2.5 Gbps Ethernet ports using Radxa's Dual 2.5G Router HAT.
I wanted a simple way to check on total network TCP throughput using both interfaces (or really, as many interfaces as possible) to multiple computers on my network, and I noticed iperf3
's --bind
option (like --bind [ip address of interface]
) was not splitting the traffic on both interfaces—it would just route all traffic through one!
Luckily, I found the issue Failing to bind to interface when multiple interfaces are present, and in it, @bmah888 mentioned the --bind-dev
option, which is new as of iperf 3.10+.
Using that option (like --bind-dev [interface name]
), you can force an instance of iperf3 to bind to one particular device. For example, assuming I have two servers on my network running iperf3 -s
, I can run the following on the Pi to saturate both connections as much as the Pi will allow: