NetEm is part of the LinuxKernel that can be used for TrafficShaping.

The home page for netem is

It is designed to do similar work to dummynet for FreeBSD and shares some code with NISTNet.

This software is used within the WandGroup for simulating loss, delay and congestion.

NetEm relies on IpRoute to enable it's features.

To build it into the Kernel you need these symbols set at least:

NetEm needs a LinuxKernel with version 2.6.13 or later unless you run an earlier development Kernel.

The way that seems to be best to use is to put the machine with netem on it between two other boxes as a router.