Adding a network delay in Windows Server 2008 R2

There is a very cool tool called DummyNet (aka IPFW) which allows you to add latency and set bandwidth or packet loss parameters to any network connection. This can be really useful when testing a client-server application on your local machine, or with virtual machines as it will simulate a more normal network experience and can highlight when you are taking too many round-trips to the server, or 

Download the binary (there is a link at the top of the page) and extract it (I’m assuming you put it in C:\DummyNet).

If you are using a 64-bit version of Windows, then copy all the files in \binary64 to \binary.

Follow the instructions in \binary\readme.txt.

Launch a Command Prompt (as administrator) and start slowing down your network!

Set 200ms of latency

Note we set the latency as 100ms as it will be applied to both incoming and outgoing messages (thus giving 200ms total).

$> ipfw pipe 3 config delay 100ms

$> ipfw add pipe 3 ip from any to any

Remove settings

$> ipfw -q flush

$> ipfw -q pipe flush

 

Advertisements