TechieStuff: 

            Follow @RainerBemsel

Simulate WAN Latency

This documents describes a tool, which I use to simulate WAN latency with the purpose to demonstrate a long-haul-network and it's throughput with FTP. Doesn't matter if you are connected via a satellite connection or a long-haul-network. You may have a bandwidth of 10Mbit and you are wondering, why you only can get 25kbit/s on this link. One of the reasons is the default window size of your TCP stack on your client and the latency on your network. The basic calculation of theoretical throughput can be done as follows:

                                 Window-Size                                             Window-Size
Max. Throughput = ------------------- or Max. Throughput = ------------------------
                               Round-Trip-Time                                             Latency * 2

What is your default window size? This depends on your operating system. Using Windows 2000 with Default Window Size of 16KB and Round-Trip-Time of 600ms will give me a theoretical throughput of 213 Kbits/s.

I've compiled a list of default window sizes , which may help in calculations.

Another great tool to use, is Packeteer's PacketShaper. It has a feature, called DQ Mode, which can be used to simulate latency as well, but also add Error rate in percentage.