Bean Network Tester

Simulate a bad network on Linux, for one app

On Linux the usual answer is tc with netem: it adds delay and loss to a whole network interface, from the command line. Bean Network Tester does the same kinds of damage to one program, from a window or from the command line, and stops on its own. Its Linux version is experimental, and this page says what that means.

tc netem commands and what to use here

A netem command and the nearest command here, side by side. Run it with sudo, and keep --target and --duration: without them it affects the whole computer, as netem does.

sudo tc qdisc add dev eth0 root netem delay 100ms 20ms loss 5%
sudo ./BeanNetworkTester --target firefox --latency 100 --jitter 20 --loss 5 --duration 60
netemSetting in the windowFlag
delay 100msLatency--latency 100
delay 100ms 20msLatency, Jitter--latency 100 --jitter 20
loss 5%Loss--loss 5
loss 100%Loss--loss 100
loss 5% 25%Loss, Losses in a row (burst)--loss 5 --loss-burst 4
duplicate 1%Duplication--dup 1
corrupt 0.1%Corruption--corrupt 0.1
reorder 25%Spike chance, Spike size--spike-prob 5 --spike-ms 200
rate 1mbitDownload, Upload--down 122 --up 122
limit 1000Buffer--buffer 1000

The numbers do not all carry over one to one. netem delays only what leaves the interface, and this tool captures both directions, so --latency 100 adds about 200 ms to a round trip: add --filter out to delay only what leaves. A netem rate is in bits per second, and the speed limit is in KB/s. The netem page explains each difference.

Why not just netem?

What it needs

tar -xzf BeanNetworkTester-*-linux-x64.tar.gz
cd BeanNetworkTester
./BeanNetworkTester --install-desktop
sudo ./BeanNetworkTester --doctor

--install-desktop adds the program to the applications menu, so run it without sudo. --doctor lists what the machine still lacks.

The network tools work on Linux too

The Tools tab answers questions before and during a test: Ping (a continuous ping with a chart), NAT and STUN, Port scan, Sockets, Port check, TCP health (what the kernel keeps for each connection, as ss -ti shows it) and Adapters (as ip addr and ip route show them). TCP health and Adapters need no sudo, and Ping needs it only where the system does not let your group send pings, as on Ubuntu 24.04.

Where Linux differs, today

For a permanent setup on a whole interface, netem is already in your kernel and is the right tool. This one is for testing one application for a while.

Ready to break your own network on purpose?

Download