If you want to simulate a WAN connection (lower bandwidth, add delay, jitter, etc.) then WANem is a solution that is (relatively) easy to use and free.
Configuring the WAN emulator is done via a webpage, but unfortunately there are no API’s exposed to automate the configuration.
Since I needed to automate the configuration of the WAN emulator I wrote a PowerShell script. You can find the PowerShell scrip below.
Download
ConfigureWanEm.ps1
Functions
The PowerShell script contains two WANem functions
- WANEmulator_Reset – Resets the configuration (of the optional interface)
- WANEmulator_Set – Sets the specified parameters (for the optional interface)
Usage
WANEmulator_Reset –HostName [-Interface]
- HostName : The hostname of the WANem appliance (FQDN or IP address)
- Interface : The interface to configure (default 0)
WANEmulator_Set –HostName [-Interface]
- HostName : The hostname of the WANem appliance (FQDN or IP address)
- Interface : The interface to configure (default 0)
- PacketLimit : The packet limit (default 1000)
- SymmetricalNetwork : Symmetrical network (Default Yes)
- BandwidthPreset : A preset bandwidhth configuration (Default Other)
- BandwidthSpecify : A bandwidth limit in Kbps (Default 0)
- DelayTime : Delay time in milliseconds (Default 0)
- Etcetera
All items that are configurable in the advanced configuration page of WANem are available as a parameter. The parameters that are shown in a dropbown box, like the bandwidth preset, are presented as an enumerable type. WYSIWYG.
Ingmar, thank you for sharing this. I’m using it to write a robocopy benchmarking test with WANem. I’ll publish my script once I’ve cleaned it up and will link back to this page.
Again, thank you! 🙂
Sounds cool!
Feel free to drop me a mail with the link