Is it possible to cause artificial network packet loss or latency?

Solution 1:

On Linux you'd use netem, on FreeBSD you'd use dummynet.

Neither of those solutions would work on a single Windows machine using Hyper-V. I searched, and I'm not able to locate any Windows Hyper-V compatible network emulators.

You could put two VMs on two different physical machines, with a Linux or FreeBSD box between them. But it doesn't look like there's any solution that's going to do exactly what you want on a single VM host.

Solution 2:

My friend has set something up using dummynet and FreeBSD in ESX. I know it's not Hyper-V, but you may be able to modify it to work for you. http://apocryph.org/2009/05/15/simulating-slow-wan-links-with-dummynet-and-vmware-esx/

Solution 3:

Dummynet should work for you: http://info.iet.unipi.it/~luigi/dummynet/

It installs a service on the NIC and then through the command line you set your parameters.

I've used it to test website access over a high-latency or low bandwidth link on Windows XP, and it works very well.

Solution 4:

An additional method is the standalone Network Emulator Toolkit (NEWT), which despite it's age is quite capable and works for x86 and x64 Windows operating systems.

https://blog.mrpol.nl/2010/01/14/network-emulator-toolkit/

Using the included XML templates with the installer, you can quickly get up and running on simulating latency, bandwidth, jitter, and other network variables.

I have tested and used this application on all versions of Windows from XP -> Windows 10.

enter image description here