When there are two computers, connect A and B to the test path. For testing within the same switch's LAN, connect them on the same subnet. For testing router forwarding, place them in two routable subnets. When the speed test service runs on the router itself, it will additionally consume CPU resources from the router's processes.
Look at the direction first, then at concurrency
Run B with iperf3 -s. A performs iperf3 -c <B地址> -t 30, then uses -R and -P 4 to measure reverse and concurrent traffic respectively. Capture actual port negotiation, throughput, retransmissions, and CPU. Perform UDP debugging starting from a lower -b, and record receive-end packet loss.
Distinguish between server performance and end-to-end port line speed
Place the iperf3 client and server on either end of the test link, ensure network interface negotiation is completed. Perform single-stream, concurrent, and reverse-direction transfers.
OpenSpeedTest within a local area network makes it easy to compare performance between smartphones and computers. Browser usage, terminal CPU, wireless, and service location are all included in the results. The service only listens to trusted LAN traffic and shuts down temporary ports and the test service after completion.
Same-subnet baseline does not imply forwarding capability; perform separate testing across VLANs and monitor router CPU usage. Report results based on actual direction and device.
Check the terminal output

First, confirm who is running iperf3 and who is only responsible for forwarding.
Assume A is at 192.0.2.0/24 and B is at 198.51.100.0/24, with traffic passing through the under-test gateway. These address ranges are for illustration only and should be replaced with actual test network addresses. On the Linux client A, execute ip route get 198.51.100.2. If the output shows routing through the expected gateway and originates from an Ethernet interface, then proceed to have B trace the return path to A. If the output shows direct transmission via the same interface to a neighbor on the same subnet, this setup is better suited for measuring switch path performance. If the destination is the gateway's own address, even if traffic traverses a physical cable, the test traffic will terminate on the router itself.
| Where is the server placed? | Which address does the client connect to? | What should we name the result? |
|---|---|---|
| OpenWrt on this device | Router's LAN address | Router local reception or transmission |
| B in the same VLAN as A | B's wired address | End-to-end throughput of this switching path |
| B on the other side of the gateway | B on an address in a different subnet | End-to-end throughput through the recorded route; can only be labeled as NAT if actual address translation has been performed. |

Both ends can query the next hop of the opposite end, with left and right paths both passing through the gateway. The 198.18 address in the figure belongs to an isolation experiment.
First, use a limited low-bandwidth flow to verify the path.
First, run iperf3 --version and iperf3 --help on both A and B to confirm support for one-shot service, JSON output, and TCP rate limiting. On B's trusted test interface, run iperf3 -s -1 -B 198.51.100.2, which accepts only one test session. On A, run iperf3 -c 198.51.100.2 -t 5 -b 1M -J. This performs a low-speed TCP path check. Record the addresses of the connection endpoints, test direction (start.test_start.reverse), and received bytes at the receiver (end.sum_received.bytes) from the JSON output. The connection addresses are found in start.connected under local_host and remote_host. If the connection times out, first verify B's listening address, firewall settings, and return path. If reverse validation is needed, restart B's one-shot service, then append -R to the end of A's original command. The server side remains unchanged; only the data transmission direction is reversed.
On the router, run ip -s link show dev IFNAME before and after the test for each interface, replacing IFNAME with its name. The changes include background traffic and can be affected by offload. Counters alone cannot identify a particular connection. Classify the result as routed only after confirming both endpoints, the next hop and the application result. For hardware comparisons also match link rates, direction, stream count, shaping and offload. Stop the temporary server and remove any firewall permission added for this test.
Measure router device capacity with packets per second and connection counts
Compare single and parallel iperf3 streams at the same aggregate target rate
Before comparing -P 1 with -P 2 on the same path from A to B, check iperf3 --version and --help at both ends. The -b target applies to each stream. Keeping -b 256K for both runs doubles the requested aggregate rate when you open two streams.
Start a one-shot server on the trusted test address at B. Restart it before the second run. Replace B's address in the client commands at A. Keep direction, duration, block size and path the same. Both runs request an aggregate 256 kbit/s for checking the fields. Buffering and short TCP writes can make the observed rate differ.
# B: run before each client test
iperf3 -s -1 -B 198.51.100.2 -p 19509
# A: restart the server at B between these commands
iperf3 -c 198.51.100.2 -p 19509 -t 2 -b 256K -P 1 -J > one.json
iperf3 -c 198.51.100.2 -p 19509 -t 2 -b 128K -P 2 -J > two.json

Read start.test_start.num_streams and end.sum_received.bytes in each JSON file. Use the receiver's measured duration for the aggregate rate. The sum_received total already includes all streams. If parallel streams raise the total, inspect per-core load at both ends, retransmissions, receive windows and queue distribution. Retest a single stream to confirm any improvement for one connection. Close the temporary service and remove the test firewall allowance.
Check IRQ distribution when a multi-gig OpenWrt router misses line rate
How to report each direction of a simultaneous iperf3 test
Label the client A and the server B, and note which one is on the router's LAN side. To measure forwarding, place the endpoints on opposite sides of the forwarding path. A loopback run on one machine is useful for learning the fields.
Check the iperf3 version and help on both endpoints. If both support --bidir, traffic can run in both directions during one test. First use low-rate one-way controls and note the sender for the default direction and for -R. Two sequential one-way tests cannot establish simultaneous bidirectional throughput.
This example runs on loopback. Run the first command in one terminal, then the second in another terminal on the same machine. The server listens only on loopback and exits after one test. The target is 128K per direction. With a short TCP test, write size and timing affect the actual rate. Use received bytes and elapsed time.
iperf3 -s -B 127.0.0.1 -p 5262 -1
iperf3 -c 127.0.0.1 -p 5262 --bidir -b 128K -t 2 -J > bidir.json

In the client JSON from iperf3 3.22 used here, end.sum_received is A to B and end.sum_received_bidir_reverse is B to A. For each direction, multiply bytes by 8 and divide by its own seconds to obtain bit/s. Report both results. If you also give an aggregate, label it as the sum of the two receive rates from that simultaneous run. Do not count a flow twice by adding its sent and received bytes. If your version uses different fields, follow its direction labels to the receiver. Record an unobserved direction as unmeasured.
Check IRQ distribution when a multi-gig OpenWrt router misses line rate
Throughput close to port speed: check negotiation and error counters
On the physical ingress or egress port, read Speed, Duplex and Link detected and compare with the matching switch port. Replace eth0 with the actual device. A bridge, VLAN or virtual NIC may lack a physical negotiation result.
ethtool eth0
ip -s link show dev eth0

In this OpenWrt 25.12.6 virtio guest, Link detected was yes but Speed and Duplex were Unknown. This does not reveal the host NIC's line rate. If both physical ends negotiated below the expected rate, check port capabilities, cable and peer one at a time. Restore the original wiring and reread the link. If negotiation is correct, compare RX/TX errors and dropped before and after the same transfer. Drops alone do not identify a bad cable. Record bytes received, time and load in the same direction before pursuing queues or CPU. These readings involved no bandwidth test.
Comments