matt_prigge
Contributing Editor

4 free tools to simulate a cloud connection

analysis
Mar 4, 20136 mins

Linux-based WAN emulation tools can help you decide whether your planned cloud migration is the right move

I wrote last week about some of the reasons you might want to simulate access to the cloud before going all-in — especially if you can’t justify the cost of a direct connection to the cloud. I also spent some time digging into various ways that you can estimate the end-to-end performance of an Internet connection.

Next on the list: Here’s how to actually emulate that connection on your own premises with your own applications.

A wide variety of tools enable you to emulate a WAN circuit. Which one is best for you depends upon your experience with network engineering (and, generally, Linux) along with whether you think you’ll need tech support. In no particular order, here are a few of the tools I’ve used, but many others are out there. Don’t be afraid to try them, too.

The Linux kernel

Believe it or not, the Linux kernel itself gives you all the tools you need to emulate a WAN. It can handle IP routing, bridging, variable delay introduction, and traffic shaping and policing. If you’re familiar with Linux and the idea of turning your favorite Live CD distribution into a router doesn’t faze you, this is probably the methodology that will give you the most control and insight — and won’t cost you a dime.

Aside from enabling IP forwarding (or bridging — more on that later), your tools of choice will be Netem and TC. Netem can be used to introduce delay (latency), jitter (variability in latency), packet reordering, packet loss, packet duplication, and packet corruption. You can implement fairly complex jitter and loss correlation settings that can make periods of higher latency, such as those surrounding upstream congestion, come in waves rather than appear randomly. Though typically used to implement QoS on Linux-based routers, TC can play a role when implementing almost any kind of traffic shaping or policing rule you can come up with.

However, turning the dials manually does pose a fairly steep learning curve. If you’re looking for something quick, it’s probably not the right tool.

WANem

WANem is a free Linux-based WAN emulation distribution that was originally created by Tata Consulting. It’s distributed as a Live CD based on the popular Knoppix distribution, so you can run it on just about anything with a CD-ROM drive and a pair of NICs. Current stable 2.x releases are nongraphical locally, but they can be configured from a Web-based GUI from another workstation on your network. The newer 3.x (in beta right now) runs a local graphical environment within a Web browser, so you can configure the emulator locally.

Given that WANem is Linux-based, it really acts as a (relatively) pretty front end for Linux’s native Netem and TC functionalities. However, with WANem, setup is quite a lot faster than the manual approach. WANem exposes almost all of the functionality of Netem, so unlike some other Linux-based Netem/TC wrappers, it’s capable of fully emulating jitter and reordering, as well as asymmetrical bandwidth limits — helpful when emulating a DSL or cable connection. But because of its extra bells and whistles, it’s more complicated to learn if you’re new to WAN emulation or network engineering in general.

WAN-Bridge

WAN-Bridge is another free Linux-based WAN emulation distribution. If your goal is to set up a bridge-based WAN emulator and you don’t care about emulating jitter, reordering, or asymmetrical bandwidth, this may be the simplest and easiest tool you’ll find. As with WANem, WAN-Bridge is a Knoppix-based Live CD that uses Netem and TC. Unlike WANem, it’s not graphical in any way, but the textual interface is simple enough that very few will have a problem using it.

The downside to WAN-Bridge is that it doesn’t expose the full feature set of Netem or TC. The distribution includes the extremely helpful Ntop tool, which gives you an idea of what kind of traffic is flowing across the WAN emulator.

Vyatta

Vyatta is a Linux-based software router owned by Brocade; it’s a commercial product, but free versions are available. If your needs are a bit more complicated and you require the full feature set of a real hardware router but don’t want to buy one, Vyatta can be pressed into service as both a router and a WAN emulator. Its network emulation feature set doesn’t have the same depth of latency controls as a manual Netem (or WANem) implementation would, but Vyatta lets you easily implement fairly complicated configurations that involve more than a pair of interfaces or dynamic routing protocols.

Vyatta can also serve as a good DIY home firewall. That means you could also use its network emulation features to mess with your significant other while he or she tries to watch Netflix (it’s hilarious, trust me).

Deciding how to test

After you’ve decided on a tool that fits your needs, the next thing to do is figure out where and how to insert it on your network. The answer to that question will depend on what you’re trying to accomplish and how many changes you’re comfortable making to your production network.

The biggest decision is whether to use a WAN emulator in a routed or bridged configuration. If you’re OK with implementing a new subnet on your network for your testing machines, then using a routed configuration will probably be best. Having separate subnets on both sides of the emulator removes some of the odd behaviors that can result from implementing traffic shaping and delay introduction in a bridge. However, if you’d like to make your testing as simple and transparent as possible, using a bridged configuration means not having to make any addressing changes on your network.

Putting it all together

No matter how you decide to do it, be sure to experiment with less critical systems before you try to restrict the traffic into the important stuff. Ultimately, you want to be able to evaluate the network impact of moving all the relevant systems and actually running them in production with real users — so don’t test by yourself off-hours and call it done. Instead, consider allowing WAN emulation to stay in place for a week or even longer, ideally during periods of high usage. Unless you’re unlucky enough to experience a failure of the hardware you’re using to do the emulation, you can always loosen or disable any bandwidth and latency restrictions if users start to revolt.

In fact, that’s the point. If users cry uncle when you flip on the WAN emulation, you can simply turn it off. That’s generally not the case when you’ve ported workloads into the cloud. By testing the cloud conditions ahead of time, you’ll avoid unpleasant surprises.

This article, “4 free tools to simulate a cloud connection,” originally appeared at InfoWorld.com. Read more of Matt Prigge’s Information Overload blog and follow the latest developments in storage at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.