netem and Network Link Conditioner on Windows
On Linux there is tc netem, and on a Mac there is Network Link Conditioner. Windows has nothing built in that adds delay and loss. This page maps what you already know onto Bean Network Tester, and points out where the numbers do not carry over.
netem options, one by one
Add --target and --duration to every command here, or it affects the whole computer.
| netem | Setting in the window | Flag |
|---|---|---|
delay 100ms | Latency | --latency 100 |
delay 100ms 20ms | Latency, Jitter | --latency 100 --jitter 20 |
loss 5% | Loss | --loss 5 |
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 1mbit | Download, Upload | --down 122 --up 122 |
limit 1000 | Buffer | --buffer 1000 |
- Burst loss. The correlation value in netem is not a burst length. Losses in a row (burst) is the average number of packets lost in a row, which is the nearest equivalent.
- Reordering. There is no reorder percentage. A spike delays a single packet so the ones sent after it overtake it, and the reordered counter on the Statistics page shows whether that really happened.
- Queue size. The netem limit counts packets. Buffer is a time in milliseconds.
Three differences to know about
Direction. netem delays what leaves an interface, and the reply comes back untouched. This tool captures both directions, so --latency 100 adds about 200 ms to a ping: 100 on the way out and 100 on the way back. To get what netem does, capture outbound traffic only:
BeanNetworkTester.exe --filter out --latency 100 --jitter 20 --target myapp.exe --duration 120
Units. A netem rate is in bits per second. The speed limit fields are in KB/s, with K = 1024. Converting megabits:
| netem rate | Speed limit field, in KB/s |
|---|---|
1mbit | 122 |
5mbit | 610 |
10mbit | 1221 |
50mbit | 6104 |
100mbit | 12207 |
Scope. tc shapes a whole network interface and needs root. This aims at one program with --target and needs administrator rights.
If you know Network Link Conditioner
Apple's tool works from named profiles. The nearest ones here:
| Network Link Conditioner | Nearest here |
|---|---|
| 100% Loss | Loss set to 100 |
| 3G | 3G network |
| DSL | Home DSL (VDSL) |
| LTE | LTE / 4G |
| WiFi | Good WiFi |
| Very Bad Network | Terrible network |
| Edge | No profile for it. Type the speed limit and latency yourself, then keep them as your own profile with the Save... button. |
The numbers are not Apple's, so treat a profile as a starting point. Every value a profile sets is listed on the reference page.
What you get on Windows
- One program, not the whole computer. Aim the impairment at a single app while the rest of the machine stays normal.
- A timeline instead of a shell script. Timed scenarios change the settings at set seconds, which is what a script of
tcandsleepdoes on Linux. - A pipeline can run it. The same executable runs in CI and reports through exit codes.
On Linux or macOS, use the originals. This tool runs on Windows only.