Network Delay Emulation

Tao Qian, a research assistant at RENCI and a PhD student of Professor Frank Mueller at the Computer Science Department, NC State University, has built a software module that allows latency emulation of IP packets per interface in Linux VMs. There is an Ubuntu image pre-loaded with this module available from the ExoGeni image proxy:

To emulate latency in your virtual topology, use the followed command to add delay in the post boot script.
  • nsdelay IP delay
For example, add 100ms delay to node “Node0″ on the interface for link “Link0″.
  • nsdelay $Node0.IP(“Link0”) 100

To remove the delay, use

  • nsdelay IP 0

which will setup the link with a FIFO queue without delay.

To change the delay, you have to remove the current delay first if any by using “nsdelay IP 0”, then set the delay again. Otherwise, the VM will shutdown if try to add delay again before clearing the current delay.

  • The latency is purely emulated on the virtual interfaces of the VMs, which means that the physical transportation latency on the virtual links in your virtual topologies is not counted, which you may need to take into consideration when conducting experimentation.
  •  If delays are changed in high frequency, excessive packet drop may occur.

Have something to add?

Loading Facebook Comments ...