How to run iperf3 throughput test for multiple client interfaces on same machine?
Sebastian Wright
I'm trying to run a throughput stress test from a machine that has multiple Ethernet interfaces to another machine with the same number of Ethernet interfaces. E.g.
machine1.ethA.192.168.1.1 <-> 192.168.1.255.ethA.machine2
machine1.ethB.192.168.1.2 <-> 192.168.1.254.ethB.machine2
machine1.ethC.192.168.1.3 <-> 192.168.1.253.ethC.machine2My initial hope was to start a single iperf3 server on machine 2 and then start three iperf3 clients on machine 1 in a usage similar to:
Start the server.
machine2 $ iperf3 --json --server --daemon --one-offStart the clients.
machine1 $ iperf3 --json --no-delay --client 192.168.1.255 --bind 192.168.1.1 --interval 0 --parallel 1 --time 30 > /tmp/client_a.log &
machine1 $ iperf3 --json --no-delay --client 192.168.1.254 --bind 192.168.1.2 --interval 0 --parallel 1 --time 30 > /tmp/client_b.log &
machine1 $ iperf3 --json --no-delay --client 192.168.1.253 --bind 192.168.1.3 --interval 0 --parallel 1 --time 30 > /tmp/client_c.log & 1 Answer
You can scope down and run multiple instances by binding.
# Start multiple instances of the server.
machine2 $ iperf3 --json --server --daemon --one-off --bind 192.168.1.255
machine2 $ iperf3 --json --server --daemon --one-off --bind 192.168.1.254
machine2 $ iperf3 --json --server --daemon --one-off --bind 192.168.1.253# Start multiple instances of the client.
machine1 $ iperf3 --json --no-delay --client 192.168.1.255 --bind 192.168.1.1 --interval 0 --parallel 1 --time 30 &
machine1 $ iperf3 --json --no-delay --client 192.168.1.254 --bind 192.168.1.2 --interval 0 --parallel 1 --time 30 &
machine1 $ iperf3 --json --no-delay --client 192.168.1.253 --bind 192.168.1.3 --interval 0 --parallel 1 --time 30 &If you don't scope down, you'll fail with "error - the server is busy running a test. try again later".