iPerf – Network Speed

There’s a tool called iPerf which is essentially a CLI speed test server and client. It runs better on Linux because there’s less shenanigans that go on inside the network stack but works well on Windows as well.

A few things you need to be aware of before running this if you want accurate results.

The first is a thing called Bandwidth Delay Product (BDP). In the network stack all applications request an amount of memory to be allocated as a buffer for incoming data. If you make this too small; you’re going to artificially limit your bandwidth.

To calculate BDP it’s a little complicated – there’s a calculator here https://www.speedguide.net/bdp.php

1. Determine MSS, maximum anticipated RTT latency and advertised maximum bandwidth.(for example, 1460 MSS, 300ms max latency, 6Mbit/s max bandwidth).2. Find the unscaled RWIN value (largest even multiple of MSS less than 65535):65535 / 1460 (MSS) = 44.9round down to even number = 4444 x 1460 = 64240 (this is the optimal unscaled RWIN value for broadband connections)3. Multiply the unscaled RWIN by 2 until it is larger than BDPOur BDP for 6Mbps @ 300 latency is:6000 kbps x 300ms = 1800000 / 8 = 22500064240 (unscaled RWIN) x 2 x 2 … = 256960 (number larger than BDP, this is the optimal RWIN)

If you’re running iPerf and doing a UDP based test (remembering UDP has a much lower overhead than TCP so will give you a more accurate result) you need to tell iPerf the amount of bandwidth you’re expecting the link to support with the -b switch

Also keep in mind if you’re running this on a live environment during production hours you’re going to saturate a link.

The last is windows firewall is not your friend here.

Fortigate also has a poor mans version of iPerf but you can’t start it in server mode.

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Interface-speed-test-on-the-firewall-for-the/ta-p/191988?externalID=FD48743

https://community.fortinet.com/t5/FortiGate/Technical-Tip-Use-cases-for-diagnose-traffictest-command/ta-p/197784

To start iperf as a server.

Iperf3 -s

To start iPerf as a client.

# TCP Test – Data Client -> Server

iperf3 -c <ip> -P 10 -t 60 -w 3M

# TCP Test – Data Server -> Client

iperf3 -c  <ip> -P 10 -t 60 -w 3M -R

# UDP Test – Data Client -> Server

iperf3 -c  <ip> -P 10 -t 60 -w 3M -b 1000M

# UDP Test – Data Server -> Client

iperf3 -c  <ip> -P 10 -t 60 -w 3M -b 1000M -R

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...