Feature #5526

Test with (simulated) slow Internet connections

Added by Tails 2013-07-18 07:42:19 . Updated 2016-02-18 18:04:09 .

Test suite
Target version:
Start date:
Due date:
% Done:


Feature Branch:
Type of work:

Affected tool:
Deliverable for:


In our test suite we need a section for simulating certain types of slow and/or unstable connections to see how Tails can handle them, in particular w.r.t Time syncing and the performance of Tor in general. We have some static timeouts in certain Tails-specific scripts that may have implicit assumptions about connections types, so these script likely could get better values from tests like these.

We need to find a backend for these simulations, and the most suitable candidate seems to be iproute2’s tool tc (pros: it’s already in Tails, and it can be controlled from within the Tails session). If it turns out to be the best tool we need to figure out how to set all the network parameters, e.g. packet loss rate, (possibly variable) bandwidth, variable delays etc.

We also need to collect reasonable network parameters (and of course identify all parameters that are relevant) for different type of slow/unstable Internet connections so we can establish profiles.

Examples of Internet connection profiles we want to simulate are:

  • 56 kbps (or maybe even 33 kbps?) dialup
  • GSM tethering
  • satellite link



#1 Updated by intrigeri 2013-10-04 08:03:15

  • Subject changed from simulating internet connections to simulating Internet connections
  • Category set to Test suite
  • Starter set to No

#2 Updated by BitingBird 2014-06-09 10:55:55

  • Subject changed from simulating Internet connections to Simulating Internet connections

#3 Updated by intrigeri 2014-07-19 20:11:58

  • Subject changed from Simulating Internet connections to Test with (simulated) slow Internet connections

#4 Updated by anonym 2016-02-18 18:04:09

A lossy network, with probability P to drop a packet, can be simulated by running the following on the system under testing:

iptables -I INPUT  1 -m statistic --mode random --probability $P -j DROP
iptables -I OUTPUT 1 -m statistic --mode random --probability $P -j DROP

To simulate a slow connection I suppose we could do some similar hack to do rate limiting.