Mercury has just announced that they will no longer be re-selling the Shunra WAN Emulator. This means that I can let you in on a little secret – you can get most of the WAN emulation features for free by using a simple open-source program.

As performance testers, we know that an application operating over the network will perform poorly if there is not enough bandwidth available. We also know that response times for some applications are more affected by latency than others no matter how much bandwidth you have (eg/ an interactive multiplayer game like Quake is playable over a 56k modem, but completely useless over a satellite link that has 10 times the bandwidth). Sidenote: a good job interview question for a performance tester might be to explain the difference between latency and bandwidth, and its impact on application performance.

Load testing with bandwidth limitations is easy; LoadRunner gives you this feature for free. Latency is harder as it requires either a real WAN link, or something to introduce an artificial delay. An artificial delay can be introduced by a black box that you plug into your network (like those offered by Anue, East Coast DataCom, and Apposite Technologies) or by a piece of software like the Shunra WAN Emulator.

Shunra WAN Emulator

The free alternative to Shunra’s software is Dummynet, which was created by an Italian academic researcher.

Unfortunately Dummynet only runs under FreeBSD, but a tiny version of FreeBSD with Dummynet that fits on a bootable floppy disk is available for download. Personally, I haven’t seen a floppy disk for years and I don’t quite trust that FreeBSD (let alone a tiny version of FreeBSD) will support the variety of hardware it will encounter.

My preferred solution is to install FreeBSD as a guest operating system inside VMware. The hardware in the virtual machine is virtualised, so you don’t have to worry about driver support, and it is easy to distribute a VMware image between computers. The only other thing you will need to do is to set up a second network card in your computer and add it to the virtual machine.

FreeBSD running inside VMware

The good thing about this solution is that it makes it easy to demonstrate latency and bandwidth-related performance problems manually, rather than expecting people to just accept your tool’s measurements. The only tricky part may be getting permission to plug your laptop into the network (or install the software) at a client site.

 

Published On: November 3, 2006Tags:

29 Comments

  1. Stuart Moncrieff November 3, 2006 at 11:11 am - Reply

    Two alternatives to the bootable floppy distribution are FreeBSD live CDs. Check out Frenzy LiveCD and FreeSBIE.

    If you are testing a web-based application, you could use a proxy with a configurable delay (can anyone help me out with a link here?).

    • Jack August 6, 2013 at 5:14 am - Reply

      I just used Shunra in the latest L.R. 11.52. I did not like the older version of this product because it was very hard to configure and very limited. The latest LR 11.52 seems to be very well engineered and it seems they finally invested time and effort on this one. For example configuring is easy, it is per group not load generator so can can create many (don’t know how many) different locations in one load generator. The reason I used it was Mobile load and this seems to be the only tool that can provide a bottleneck per virtual user or in other words latency, bandwidth, utilization of bandwidth ect’ all per vu. hope this helps.

      • Mani May 8, 2014 at 4:00 pm - Reply

        Hi Jack, I am also using Shunra for WAN Emulation in ALM 11.52, but it does not work properly. It throws many error. We have had support from HP team too. Still it is under working. How did you get it working? Kindly suggest me the settings and licences you have.

        Thanks,
        Manimozhi

  2. Corey November 3, 2006 at 1:45 pm - Reply

    this is cool.. gonna have to give it a try. i like the idea of a virtualized bandwidth emulator, thanks.

  3. Bob November 4, 2006 at 6:31 am - Reply

    Shunra has commercially proofed tools from $499. See http://www.shunra.com

    • Jonathan June 1, 2013 at 4:45 am - Reply

      Bob; Do you work for Shunra ?

  4. Henrik Gammelgaard November 4, 2006 at 7:09 am - Reply

    I have a similar setup where I work, on this setup I have registered a number of IP addresses for the virtual NIC and incoming/outcoming tcp/ip traffic has its own queue, this gives me the option to quickly switch between different bandwidth setups.

    On top of this I have a Squid proxy so I quickly can try different setups without changing NIC configuration on my local computer, just to make it a tad easier.

  5. Alexander Podelko November 5, 2006 at 2:01 pm - Reply

    My understanding is that for free you can limit bandwidth for individual user. You can’t, for example, simulate a bandwidth restriction for a branch (a group of users) that is a common case for corporate applications.

  6. Stuart Moncrieff November 6, 2006 at 9:11 am - Reply

    Bob (with an @shunra.com email address),
    it’s great that a company like Shunra is keeping an eye on the technical blog community.

    People should note that Shunra offers a free 5-day trial of VE Desktop. If you want to simulate the properties of your network on a Windows, Shunra is a good option.

    Henrik,
    excellent tips. Thanks for the comment!

    Alexander,
    You are correct that the “speed simulation” in the runtime settings is for individual users. I should have noted this in the post.

  7. Chris Meisenzahl November 7, 2006 at 1:09 am - Reply

    Great post! Another wonderful use for VMware.

  8. Brent May 25, 2007 at 5:48 am - Reply

    This is nice, but if you have to use VMWare, then you have to buy VMWare, and then this solution is no longer free, is it?

  9. Ben Simo June 9, 2007 at 12:38 am - Reply

    Load testing with bandwidth limitations is easy; LoadRunner gives you this feature for free.

    This is only true for individual vuser bandwidth limitations. LoadRunner limits the bandwidth per vuser. It has no option to limite the combined bandwidth of a group of vusers. Thus a reason in addition to delay emulation for needing some external WAN emulation.

  10. Bill July 10, 2007 at 2:34 am - Reply

    Very cool idea. Do you know if there is a virtual appliance available for download with FreeBSD and Dummynet preinstalled?

  11. Sam Jones November 8, 2007 at 2:29 am - Reply

    Brent: VMWare offers some free products and a free alternative is Microsoft’s Virtual PC.

  12. Jose Ganzalez February 27, 2008 at 4:00 pm - Reply

    I have found alternative here:

    http://www.xpidea.com/Products/tabid/53/ProductID/19/Default.aspx

    Although, this product does not have all of the bells and whistles Shunra has, latency and bandwidth emulation is all I need. Good product!

  13. Anthony July 24, 2008 at 4:44 am - Reply

    M0n0wall will do latency and it is a free firewall.
    http://m0n0.ch/wall/

    Check it out 😉

  14. Dave May 1, 2009 at 6:54 am - Reply

    It looks like Mercury/HP is re-selling the Shunra WAN emulator again.

    They have some videos of the newest version here:
    http://www.shunra.com/shunra-demo-center.php

    And a press release here:
    http://www.shunra.com/pr-09-shunras-wan-emulation-for-hp-software.php

  15. Deeptendu Dhar June 30, 2009 at 4:01 pm - Reply

    The free linux netem tool works perfectly fine in emulating WAN delays.

    For example, to emulate a symmetric WAN with 300 ms delay, you can use the following commands:

    Add delay to outgoing packets on eth0:
    # tc qdisc add dev eth0 root netem delay 300ms

    Add delay to incoming packets on eth0:
    # modprobe ifb
    # ip link set dev ifb0 up
    # tc qdisc add dev eth0 ingress
    # tc filter add dev eth0 parent ffff: protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb0
    # tc qdisc add dev ifb0 root netem delay 300ms

    Linux has a lot of very advanced traffic control features that can be used for such purposes. For usage of the tc tool, just run a man tc on your linux machine. For details refer to:
    http://lartc.org/howto/
    http://linux-ip.net/articles/Traffic-Control-HOWTO/

  16. Eric September 30, 2009 at 11:32 am - Reply

    I use WAN Emulator from XP Idea
    http://www.xpidea.com/Products/tabid/53/ProductID/19/Default.aspx
    It is .NET based proxy service, which sits between a client application and the real server and simulates WAN’s bandwidth and latency. I think may not be appropriate for large scale load testing, since it is a strictly software product (has buffer memory limits), although works great for me. Another good thing about it compare to Shunra for instance- it is less expensive and you don’t have to deal with the licensing. You buy it, install it and use it –no serial numbers, no use limits – nothing. …I guess those guys really rely on people’s honesty 😉

  17. scott October 23, 2009 at 6:26 pm - Reply

    dummynet comes with every Mac, and has since 10.0

  18. Sue Watts February 9, 2010 at 2:55 am - Reply

    Yes, Shunra now has its VE Desktop software inside HP LoadRunner and Performance Center v9.5. You can add this capability on when you upgrade. Learn more: http://www.shunra.com/shunra_ve_desktop_for_hp_software_overview.php?keyword=VED for HP Software

  19. Mark February 12, 2010 at 3:09 am - Reply

    There’s another free option for WAN Emulation:
    http://www.dummycloud.com

    Both physical and virtual appliances!!!

  20. Nuno February 20, 2010 at 3:40 am - Reply

    I’ve been using a FreeBSD based virtual appliance WAN Emulator.
    They have a free version for download.

    http://www.dummycloud.com

    Pretty good.

  21. lnielsen March 13, 2010 at 1:31 pm - Reply

    Another vote for m0n0wall. It is a pre-built FreeBSD with dummynet and has a nice web interface. I run it on a Soekris net5501 box but you could use any old PC with two NICs. Just plug the box in between your client machine and the network.

  22. David Knight April 15, 2011 at 11:38 pm - Reply

    We’ve tried various WAN emulates and whilst most of the free one’s do an acceptable job I found them clunky to use and not able to reproduce WAN’s accurately enough for real-world emulation.

    After testing various commercial ones we decided to go with “Shamrock” (from JAR Technologies – http://www.JARTechnologies.com) mainly because its cost effective, one stop shop for emulation, load generation, stats and analysing (reports, etc.) plus it can be integrated into our test environment!! (it talks XML)

    David

  23. amel August 1, 2011 at 12:55 am - Reply

    thank you for software

  24. amel August 1, 2011 at 12:56 am - Reply

    thanks

  25. Adam December 16, 2011 at 12:46 am - Reply

    Well I’ve just found a free one on a bootable cd, waiting for it to download but looks very simple to use. Supports Jitter, Latency, bandwidth, reordering, duplication, corruption, all sorts! the lot. And you can setup different settings for different groups/IP addresses.
    http://wanem.sourceforge.net/

  26. John Graham February 2, 2012 at 11:18 am - Reply

    Failed using this software – almost impossible to use…switched to a JAR Technologies range and a few mates have tried a Candelatach version. Have to humbly say that I prefer the first not sure how they are getting on? guys? want to reply?

Leave A Comment