NETem - Network Link Emulator for GNS3
NETem emulates a network link, typically a WAN link. It supports bandwidth limitation, delay, jitter and packet loss. All this functionality is already build in the linux kernel, NETem is just a menu system to make the configuration user-friendly.
There is already a VM for that: WANem, the Wide Area Network emulator. But it's rather big, about 590 MByte. Therefore I decided to create a stripped down version. It's only 25 MByte "big", uses bridging (no fiddling with IP addresses) and has a simple menu system.
In your project insert the NETem VM and connect it's two interfaces.
The NETem is fully transparent, it bridges the traffic from one interface to the other one. Even CDP and Spanning Tree traffic is bridged. As the NETem VM only bridges, it needs no IP addresses.
From the connected network elements viewpoint, it's invisible. Therefore there's no need to change anything in their IP configuration.
A menu on the console allows the configuration of the line parameters:
Here you can configure the link characteristics and save/restore the configuration. A configuration named "init" is loaded at startup.
Normally the same parameter are applied in both directions (symmetrical). But you have the choice to create an asymmetric configuration.
Even though it uses linux it can savely be stopped by GNS3, a clean shutdown is not neccessary.
Download NETem VM
|NETem-v4.ova||created 2016-01-21||NETem application for VirtualBox and VMware|
|NETem-v4.qcow2||created 2016-01-21||NETem image for QEMU|
Installation of NETem VM in GNS3
The easiest way is to download the NETem appliance from https://raw.githubusercontent.com/GNS3/gns3-registry/master/appliances/netem.gns3a and import it (File / Import Appliance) into GNS3.
But this is limited to GNS3 versions 1.4 or later. Furthermore you can add an appliance only to the GNS3 VM or a linux based GNS3 server.
Import the .ova into VirtualBox, optionally adapt the name.
The imported VM has no network interfaces, these will be later added by GNS3. If you want to use the NETem VM standalone (without GNS3), add two interfaces with adapter type “Intel PRO/1000 MT Desktop”.
Add the NETem VM in GNS3, then edit it:
- General Settings: Enable "Start VM in headless mode".
- Network: Set "Adapters" to two.
- Optionally: Choose another icon
The preference for a NETem VM should look like this:
The VMware integration into GNS3 is currently not as mature as for VirtualBox. Be prepared for some experiments.
Promiscuous mode (for bridging) needs special attention:
- On Mac OS X you get an authentication dialog, when a device enters promiscious mode. Starting with Fusion 6 this dialog can be suppressed by disabling “Require authentication to enter promiscuous mode” in the network section of the Fusion preferences.
On Linux you need read/write access to the vmnet devices,
otherwise promiscuous mode is blocked.
For details have a look here: How to use virtual Ethernet adapters in promiscuous mode on VMware.
Import the .ova into VMware, optionally customize the OS settings to “Other Linux 3.x kernel” or “Other Linux 2.6.x kernel”. As with VirtualBox, the network interfaces are added by GNS3. Add two interfaces, if you want to use this VM standalone.
Then add this VM in GNS3, set the headless mode and the number of network adapters to two. Set the Network type to e1000, as the default type PCnet32 supports only a MTU of 1500.
In GNS3 use the QEMU VM wizard to add a new VM. Set the RAM size to 128 MB and choose the NETem.qcow2 image.
Afterwards change the number of network adapters to two.