Skip to content
May 14 / Greg

Simulate WAN Delay, Loss and Bandwidth

I recently had a question about how to simulate the delay presented by a point to point circuit so someone could test their application going from one facility to access a SQL DB in a backup colo. I did a quick google and ended up with several great options.

Netem

One option I found, but didn’t test is Netem. This is a command line linux app that allows you to introduce delay, loss, duplication and re-ordering.

WANbridge

I then found WANbridge. I did test this one and it worked a treat. It is a bootable ISO based on Knoppix. It boots up and immedately bridges all interfaces together. Through it’s simple menu system I was simulating delay in less than 2 minutes. I also successfully tested bandwidth constraints. It also offers the ability to simulate loss. It has a great quick start guide that will have you up and working in no time fast.
Quick WANbridge video

WANem

Last I found WANem. This is similar to wanbridge in that it is built off of a bootable Knoppix ISO, but by default it is configured to route. I did find a quick CLI guide to setting it up for bridged, though.

Bridge setup
Edit /etc/network/interfaces and add the following lines:

1
2
3
4
5
6
7
8
auto br0
iface br0 inet static
        address 192.168.0.20
        netmask 255.255.255.0
        gateway 192.168.0.1
        bridge_ports all
        bridge_fd 0
        bridge_stp off

What you gain with WANem is features. First it has a web based GUI that will allow you to configure per interface configurations. This means that you can have different settings for incoming on one interface and outgoing on the other.

Options include bandwidth, delay, packet loss, duplication, packet reordering, corruption, random disconnects. All of these options can also have IP source/destination matchers.

Click image to enlarge.

Basic Mode


Click image to enlarge.

Advanced Mode...this is where you want to be!

4 Comments

leave a comment
  1. Matt H / May 17 2012

    Really enjoying your mikrotik tutorials Greg.

    There is also another great tool that is available on a number of platforms now including windows. It’s called dummynet which allows you to simulate bandwidth limitations, delays and packet loss.

  2. Greg / May 18 2012

    @Matt
    Thanks for the tip. I googled it and it does seem to be very similar…though it appears to have a windows port. 🙂

  3. J.J. Boyd / May 21 2012

    I think you are just tryuing to hate on the Diablo 3 peeps 😛 lol.

  4. Greg / May 21 2012

    @JJ
    It is what it is 😉

Leave a Comment

 

*