Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to reproduce an issue with a client-server asynchronous communication (a bunch of JavaScript AJAX vs. an OData api), seemingly caused by some race condition in the calculations when the server and/or the network connection slow down.

Now, the test environment I have is a local Hyper-V machine, so it's all shiny and fast ... I need it to slow down to verify it.

Is there any known method to (basically) make a LAN Hyper-V machine to behave like a remote server reached though a crawling internet connection ?

share|improve this question
To be clear - it sounds like you're wanting to introduce network lacency, correct? –  EEAA Apr 4 at 16:14
You could try playing with the Policy-based QoS of your local computer policy. I used to use it via Group Policy to throttle users who spent all day on Youtube instead of working. –  Ryan Ries Apr 4 at 16:57
You should edit the question title to make clear you want to slow down the network connection, not the whole VM. –  Massimo Apr 4 at 17:14
I expanded the title. Anyway, making it grind regardless of network performance would be also good (to emulate a heavy load) –  Alex Apr 7 at 7:12

3 Answers 3

up vote 4 down vote accepted

The best method I have found for simulating a crapy internet connection is to put a pfsense router between the server and my test PC and setup the Limiter features. https://doc.pfsense.org/index.php/Traffic_Shaping_Guide#Limiter

This can be used to emulate a slow network, latency or even introduce packet loss to see how your applications react to adverse network conditions.

pfsense can run inside a hyperv virtual machine. So you can set it up then change the webserver network settings to be behind pfsense.

If you don't like pfsense you can use any BSD distro that supports Dummynet. http://cs.baylor.edu/~donahoo/tools/dummy/tutorial.htm

share|improve this answer
Sorry to ask, but how can it simulate a bad network connection? No latency cn be introduced. –  TomTom Apr 4 at 16:19
@tomtom The documentation for dummynet (which pfsense uses) says it can introduce delays.info.iet.unipi.it/~luigi/dummynet/#3d2a You can configure how many ms of delay to add. –  Grant Apr 4 at 16:20
Whow, that would rock. Been locking for something like that for ages. –  TomTom Apr 4 at 16:26
@Tomtom it DOES rock. Its a pain to configure the first time but it lets you see how well your stuff works for a dialup client during a thunderstorm without leaving your desk. –  Grant Apr 4 at 16:30
GREAT. I can use that - I do a lot of time sensitive stuff and being able to introduce a 10ms latency is - very very very nice here. –  TomTom Apr 4 at 16:36

You can't slow down the networking on the guest VM, but you can place it behind a router which will take care of slowing down the connection; that router can be another WM with two network interfaces, running a tool capable of customizing the network bandwidth and latency to your needs.

There are various tools for this, one of the most versatile and easiest to setup and use is WANEM.

share|improve this answer

Not out of the box. You also do not need the machine to be slower - you want to simulate a LAN connection, i.e. low bandwidth (which can be done in Hyper-V 2012 R2 to a certain aspect) and latency. Latency is really hard to do - i know of no software doing that - because it would mean buffering all packets.

LAN badiwdth is easy - run it all through a capable router (Mikrotik) that has QOS and make the bandwidth really really really bad there.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.