When testing throughput across a WiFi bridge, we're dealing with several variables that affect measurement accuracy. The physical layer characteristics, interference, and protocol overhead all contribute to the difference between theoretical and actual bandwidth.
Here are the most reliable tools I've used in production environments:
- iperf3 (gold standard for raw TCP/UDP testing)
- nutttcp (lightweight alternative to iperf)
- flent (for advanced latency and throughput analysis)
- speedtest-cli (for quick checks against public servers)
First, install on both ends of your bridge:
# On Debian/Ubuntu
sudo apt install iperf3
# On server side (connected device):
iperf3 -s
# On client side (bridge device):
iperf3 -c server_ip -t 30 -P 4
Key metrics to analyze:
[ ID] Interval Transfer Bitrate Retr
[ 4] 0.00-30.00 sec 187 MBytes 52.3 Mbits/sec 43 sender
[ 4] 0.00-30.00 sec 187 MBytes 52.3 Mbits/sec receiver
Focus on the receiver's bitrate and retransmissions (Retr) count. High retransmissions indicate packet loss.
For programmatic testing, here's a simple Python script using subprocess:
import subprocess
import json
def run_iperf_test(server_ip, duration=10):
cmd = f"iperf3 -c {server_ip} -t {duration} -J"
result = subprocess.run(cmd.split(), capture_output=True, text=True)
return json.loads(result.stdout)
# Example usage
results = run_iperf_test("192.168.1.100")
print(f"Throughput: {results['end']['sum_received']['bits_per_second']/1e6:.2f} Mbps")
- Testing during peak network usage hours
- Not accounting for protocol overhead (TCP/IP adds ~3-5% overhead)
- Ignoring channel congestion in 2.4GHz bands
- Using default window sizes that don't match your MTU
For latency-sensitive applications, UDP testing reveals different characteristics:
iperf3 -c server_ip -u -b 50M -t 20
The -b
parameter limits bandwidth to prevent flooding your connection.
When testing network throughput across a WiFi bridge, we're dealing with several technical complexities that affect measurement accuracy:
- Wireless signal interference
- Protocol overhead (TCP/IP, 802.11 headers)
- Half-duplex nature of WiFi
- Distance and physical obstructions
These tools provide reliable throughput measurements when properly configured:
# iPerf3 (cross-platform)
iperf3 -s # On server
iperf3 -c server_ip -t 60 -P 4 # On client
# JPerf (GUI for iPerf)
# Requires Java:
java -jar jperf-2.0.2.jar
For accurate WiFi bridge testing, consider these approaches:
# Test UDP throughput (eliminates TCP overhead)
iperf3 -c server_ip -u -b 1000M
# Measure packet loss:
ping -c 1000 -i 0.2 bridge_endpoint | grep "packet loss"
# Tcpdump for protocol analysis:
tcpdump -i wlan0 -w traffic.pcap
Here's a script that automates throughput testing:
import subprocess
import json
def test_throughput(server_ip, duration=30, parallel=4):
cmd = f"iperf3 -c {server_ip} -t {duration} -P {parallel} -J"
result = subprocess.run(cmd.split(), capture_output=True, text=True)
data = json.loads(result.stdout)
throughput = data['end']['sum_received']['bits_per_second'] / 1e6
retransmits = data['end']['sum_sent']['retransmits']
return {
'throughput_mbps': round(throughput, 2),
'retransmit_rate': retransmits / data['end']['sum_sent']['bytes']
}
Consider these factors when analyzing test output:
Metric | Acceptable Range | Troubleshooting |
---|---|---|
Throughput | ≥70% of rated speed | Check channel interference |
Packet loss | <1% | Verify antenna alignment |
Latency | <10ms local | Test wired baseline |
From my experience optimizing a 5GHz WiFi bridge:
- Set MTU to 1500 (test with ping -f -l)
- Disable power saving on WiFi adapters
- Use non-overlapping channels (36, 149 for 5GHz)
- Update firmware on both bridge endpoints