NewsPublikationen & ReferateWeb Articles (English)Software Goodies

WAN simulation with eEx NetLab

This article complies to NetLab Version 1.9 and above. Download the .XNL file here.

A question which arises relatively often is how to emulate WAN networks with eEx NetLab, so I decided to write a little article about it.

During the early stages of development, easy WAN emulation was a design goal of the NetLab project. This is why the first version already included a traffic handler called WAN Emulator.

There are two ways to use this functionality. The first one, which is probably the more flexible one, is to build up a router and then extend it with the WAN Emulator. This solution is simple to accomplish once you understood the inner workings of the Net Lab (I strongly recommend reading the two tutorials linked above).

The second way for accomplishing WAN Emulation is more straight-forward and also makes the operation of the WAN Emulator completely transparent, but requires two Network Interfaces. This is done by simply creating two Interfaces and adding two Direct Interface IOs, then putting two WAN Emulators between them, one for each direction. This solution was also discussed here on stackoverflow.com.

Be careful to link up the correct traffic handler ports:

  • Each Interface has its Interface Port linked with the Interface IO Port of one of the Direct Interface IOs.
  • Each Direct Interface IO has its Traffic Handler In Port linked with the Traffic Handler Out Port of one of the two WAN-Emulators.
  • Each Direct Interface IO has its Traffic Handler Out Port linked with the Traffic Handler In Port of the other WAN Emulator.

If you are not certain about this, download the .XNL file corresponding to this article and have a look at it.

Also be careful about the Interface settings. It is crucial that you exclude your own traffic by checking the corresponding checkbox. If you don't do that, you will create a network loop which will at least hang your computer, and in the worst case the network. If you have done it by accident (or could not resist to try), disconnect your network connections by unplugging the cable. Then adjust the settings correctly and reconnect. 

The benefit of this method is that you can make the WAN emulation completely transparent for the rest of the network, since all packets, even ARP packets, are simply passed trough your system. The are only occasionally modified, duplicated or dropped silently by the WAN Emulator.

Notes on WAN Emulator operation

The WAN Emulator is designed to simulate basic effects of WAN networks on End-To-End connections, which include limited bandwidth, packet drop, packet duplicate, shuffling, packet corruption and delay.

What the WAN Emulator does not provide is a way to simulate real WAN protocols or connections, but it can simulate you a nice "network cloud" to test protocols or teach your students about the impacts a WAN link has on a network.

Just have a look at these examples:

This is a screenshot of a continuous ping between two hosts, one in VMNet1, the other in VMNet2. Between the pings which are marked in the screenshot, I increased the minimum and maximum delay settings of the WAN Emulator. As you can see the roundtrip time of the ICMP frames increased.

Here we have the same ping, but now I increased the probability of packet corruption (to around 15%) and the min and max byte errors. As you can see, some packets were dropped by the receiving host, since the payload of the ICMP frames was modified and so, the ICMP message was not being recognized by the sender any more.

Conclusion

The NetLab WAN emulator is a simple tool to make the testing of network protocols and teaching the impacts of WAN links easier. Just make sure to play around with the settings a little bit to achieve what you want.

 

You can read more about the other WAN Emulator settings here.

If you have any comments or questions, feel free to contact me

Download the .XNL file.

 

Copyright © Emanuel Jöbstl, 07.08.2011
License: Creative Commons Attribution-ShareAlike

Impressum | Find us on Facebook | Login | © Emanuel Jöbstl / eex-dev.net 2012