[clug] Simulating Network Delays on a Single Machine

Steve Walsh steve at nerdvana.org.au
Fri Sep 11 00:12:13 UTC 2020

Hi Jeff

take a look at the netem tool -

adds a fixed amount of delay to all packets going out of the local

 # tc qdisc add dev eth0 root netem delay 100ms

Real wide area networks show variability so it is possible to add random

 # tc qdisc change dev eth0 root netem delay 100ms 10ms

This causes the added delay to be 100ms ± 10ms. Network delay variation
isn't purely random, so to emulate that there is a correlation
<http://en.wikipedia.com/wiki/correlation> value as well.

 # tc qdisc change dev eth0 root netem delay 100ms 10ms 25%


hope that helps.

On 11/9/20 9:36 am, jm via linux wrote:
> Is there a good way to simulator for the purposes of development and
> testing a network with variable high delay (round trip times of 600ms to
> 2.5s) and occasional packet loss on a computer? Are there iptables rules
> or a daemon that I can put between the client and the server to do this?
> Jeff.

More information about the linux mailing list