Dur­ing prepa­ra­tion and pre­lim­i­nary infor­ma­tion gath­er­ing for a new inter­nal project, I had a need to emu­late var­i­ous net­work­ing con­di­tions and sce­nar­ios. More specif­i­cally I’m look­ing at the pos­si­bil­ity of run­ning the vCen­ter Client over high latency satel­lite links, with vary­ing band­width avail­abil­ity and even packet loss scenarios.

Obvi­ously the best way of test­ing this, in a con­trolled envi­ron­ment, is to use some kind of WAN emu­la­tor that lets you con­trol the var­i­ous net­work­ing char­ac­ter­is­tics. WANem is a free WAN emu­la­tor and it even comes as a VMware vir­tual appli­ance.

Setup is pretty straight for­ward, and I won’t get into the detailed instruc­tions at this point. If some­one requests it, per­haps I’ll make a HOWTO post later on.

After the WANem Vir­tual Appli­ance has been started and setup in your net­work envi­ron­ment, all you have to do is to route your traf­fic through it. In my test envi­ron­ment, I decided to route all traf­fic between my local com­puter and my vCen­ter Server through the WANem appli­ance. Doing so is pretty straight for­ward; Open up a cmd win­dow, with admin­is­tra­tor priv­i­leges, on your local com­puter and use the route com­mand to force traf­fic through WANem:

the com­mand itself is:
route add {des­ti­na­tion IP} mask 255.255.255.255 {WANem IP}

To tune the net­work prop­er­ties of the traf­fic going through WANem, open the WANem admin page in your browser and work some magic. The screen­shots below are from the advanced tab:

WANem Advanced Mode Screenshot #1WANem Advanced Mode Screenshot #2

As a sim­ple test, I decided to add 500ms latency (delay time) and a packet loss of 25%, and as you can see from the video below it works as expected


(Video has been scaled to fit, watch it in fullscreen mode for details).

Con­clu­sion

If you need to test out how your appli­ca­tions or net­work­ing infra­struc­ture works when issues like latency, jit­ter and even dropped pack­ets affects your clients, WANem seems like an easy and free route (pun intended) for test­ing purposes.

Written by . Christian is the owner of vNinja.net and a Senior Consultant for EDB ErgoGroup specializing in virtualization. Active twitter user and vSoup.net Virtualization Podcast co-host.