I need to simulate a low bandwidth, high latency connection to a server in order to emulate the conditions of a VPN at a remote site. The bandwidth and latency should be tweakable so I can discover the best combination in order to run our software package.
In the past, I have used a bridge using the Linux Netem (Network Emulation) functionality. It is highly configurable -- allowing the introduction of delays (the first example is for a WAN), packet loss, corruption, etc.
EDIT: There is also the MasterShaper web interface to control the settings.
Try WANem
WANem is a Wide Area Network Emulator, meant to provide a real experience of a Wide Area Network/Internet, during application development / testing over a LAN environment.
We used this software once inside of a Virtual Machine to do some bandwidth scale testing:
http://www.softinengines.com/index.php?section=download&langu=en
It's not free, but does have a 30 day trial.
You can use vmware to run BSD or Linux and try this article (DummyNet) or this one.
Edit: After I wrote this I came across Charles the web debugging proxy application and had great success in emulating network latency.
Bandwidth throttle / Bandwidth simulator
Charles can be used to adjust the bandwidth and latency of your Internet connection. This enables you to simulate modem conditions using your high-speed connection.
The bandwidth may be throttled to any arbitrary bytes per second. This enables any connection speed to be simulated.
The latency may also be set to any arbitrary number of milliseconds. The latency delay simulates the latency experienced on slower connections, that is the delay between making a request and the request being received at the other end
There's an excellent writeup of setting up a FreeBSD machine to do just this - take your standard old desktop, toss in an additional NIC, and build.
The writeup is available at http://www.freebsd.org/doc/en/articles/filtering-bridges/article.html.
In step 5 of the above instructions, you're enabling a firewall. For just simulating a different IP connection, you could (for example) do the following:
Create a file /etc/rc.firewall.56k which contains the following:
ipfw add pipe 1 ip from any to any out
ipfw add pipe 2 ip from any to any in
ipfw pipe 1 config bw 56Kbit/s
ipfw pipe 2 config bw 56Kbit/s
And change /etc/rc.conf... replace the line
firewall_type="open"
with
firewall_type="/etc/rc.firewall.56k"
reboot, and you've got yourself a 56K bridge!
If you happen to be working from a Macintosh, that OS has ipfw built into it by default. I've done the same thing by routing network traffic over the Airport and through the ethernet, setting it up so that anything coming over the airport has the same characteristics as whatever I'm trying to emulate. You can invoke the ipfw commands directly from the terminal and get the same effects.
If you're on linux, I find the Traffic Control program to be a great help for this sort of thing.
For Windows you can use this application: http://www.softperfect.com/products/connectionemulator/
WAN Connection Emulator for Windows 2000, XP, 2003, Vista, Seven and 2008.
Perhaps the only one available for Windows.
There is a product from http://www.shunra.com called VE Desktop which can be used to simulate varying network conditions. It allows you to tweak latencies, bandwidth and packetloss with a simple UI. Only caveat is, its not free. Hope this helps.
Another client-side program (Windows only), is NetLimiter - http://www.netlimiter.com