Netem provides network emulation functions for testing protocols by emulating properties of wide area networks, such as delay jitter, loss, duplication and re-ordering. Netem is already enabled in the kernel of various current Linux distributions.
References:
Netem - LinuxNet
http://linux-net.osdl.org/index.php/Netem