Slowing down your network to make it look like GPRS

About

If you want to test how tinymail will behave on slow networks, like GPRS-like networks which are commonly used with mobile devices, it's interesting to slowdown your network.

There are a few solutions for this

Traffic shaping & advanced Linux routing

NETEM

Slowdown:

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: netem delay 1000ms
tc qdisc add dev eth0 parent 1: handle 10: htb default 1
tc class add dev eth0 parent 10: classid 10:1 htb rate 10kbit ceil 35kbit

On a router you can of course use ppp0 and eth0, or eth0 and eth1 to slow it down in both directions.

Undo:

tc qdisc del dev eth0 root

For more information about NETEM, check out this page

NIST

More information here

Measuring the bandwidth

Commonly used are tcpdump in combination with wireshark