Tools and Scripts
In the following you can find some useful tools and scripts. Most of them are related to TCP performance measurements in Linux.
Netem um-enhanced patch
netem provides Network Emulation functionality for testing protocols by emulating the properties of wide area networks. The recent version emulates variable delay, loss, duplication and re-ordering. If you run a current 2.6 distribution, (Fedora, OpenSuse, Gentoo, Debian, Mandriva, Ubuntu), then netem is already enabled in the kernel and a current version of iproute2 is included.
Netem is controlled by the command line tool tc which is part
of the iproute2 package of tools. The tc command uses shared libraries
and data files in the /usr/lib/tc directory.
This patch adds a new feature to the network simulator NetEm: The newly introduced
parameter reorderdelay TIME is the time a reordered packet is delayed.
It can be used in a combination with delay TIME to enable netem to produce
late packets, which is not possible in the standard netem / tc. In the standard version
reordered packets are always sent immediately and therefore are always early packets.
example uses:
tc qdisc add dev eth0 root netem reorder 1% delay 0ms reorderdelay 100ms
This will produces a 100ms delayed packet with 1% propability, all other packets will be sent
immediately (late packet).
tc qdisc add dev eth0 root netem reorder 1% delay 100ms reorderdelay 0ms
This will delay most packets by 100ms, just 1% will be sent immediately (early packet).
tc qdisc add dev eth0 root netem gap 99 delay 0ms reorderdelay 50ms
This will delay every 100th packet by 50ms. (gap between reordered packets is 99)
For more real world like scenarios, TIME can be followed by a jitter and correlation:
tc qdisc add dev eth0 root netem reorder 1% delay 10ms 5ms 10% reorderdelay 50ms 20ms 50%
be careful, jitter can implicitly produce reordering, when packets follow each other fast enough.
gap and reorder can also be combined.


