ntools

ngen

nrecv

nserver

nclient

nemu

nemud
NAME

nemu - the network emulator client of ntools

SYNOPSYS

nemu -reset -clear -cnt -get

-1closs continuous_loss

-1bloss bursty_loss -1blossm bursty_loss_max -1blossl bursty_loss_length -1blossp bursty_loss_period

-1delay delay

-1cjitter continuous_jitter

-1filejitter file

-1jitter jitter -1jitterl jitter_loss -1jitteru jitter_up -1jitterk jitter_keep -1jitterd jitter_down -1jitterp jitter_period

-2closs continuous_loss

-2bloss bursty_loss -2blossm bursty_loss_max -2blossl bursty_loss_length -2blossp bursty_loss_period

-2delay delay

-2cjitter continuous_jitter

-2filejitter file

-2jitter jitter -2jitterl jitter_loss -2jitteru jitter_up -2jitterk jitter_keep -2jitterd jitter_down -2jitterp jitter_period

All parameters are optional.

DESCRIPTION

nemu is the network emulator client of ntools. It is used to change the impairment settings of the emulator daemon. The current settings can be retrieved with the -get command. When new parameters are supplied all other old parameters remain untouched. Every time you want to start with fresh new settings, use the -reset command.

There are two sets of parameters, for both directions. The parameters with the "-1" prefix are for the direction from the first interface towards the second one, while prefix "-2" is for the other direction.

COMMANDS

-reset

Resets the emulator daemon: clears the impairments and the counters.

-clear

Clears the frame counters.

-cnt

Retrieves the frame counters. There are two counters for each direction: total received frames and dropped frames.

-get

Retrieves the impairment settings of the emulator daemon.

IMPAIRMENTS

The following impairments are implemented. For the exact format of the parameters see the PARAMETERS section.

Continuous loss (-1closs loss)

This impairment will make continuous loss % frame loss.

Bursty loss (-1bloss loss -1blossm max -1blossl length -1blossp period)

This impairment implements bursty losses. Periodically, within each period there will be a loss burst with lenght length, and loss % frame loss. With the max parameter it is possible to maximize the number of lost frames in the burst.

Delay (-1delay delay)

This implements continuous delay.

Continuous jitter (-1cjitter jitter)

This implements continuous random jitter between 0 and jitter.

Jitter from file (-1filejitter file)

This impairment modul will take the jitter values from a file, and apply the successive values to the incoming frames. When reached the end of the list it will start over again from the first value.

Jitter spikes (-1jitter jitter -1jitterl loss -1jitteru up -1jitterk keep -1jitterd down -1jitterp period)

This modul implements periodic jitter spikes. Within each period period there will be one jitter spike with trapezoid shape. During the spike the jitter will go up from 0 to jitter within up time. It will keep that jitter for keep time, and then will go down to 0 within down time. During the keep period loss % loss is implemented. (It can be set to 0 if not needed.)

Any of these impairments can be used together, and their effect is additive. A frame is lost if any of the loss impairments decides so. The delay and jitter values from the different impairments are simply added together.

PARAMETERS

Loss values

The loss values (-1closs -1bloss -1jitterl) are specified in percentage without the % symbol. Note that these values will be converted to "1 out of x" internally, so the actual loss ratio might not exactly match the requested one, especially with high loss ratios. For example any values above 50% will result in 100% loss. Please check the actual values with the -get command.

Time values

The time values (-1blossl -1blossp -1delay -1cjitter -1jitter -1jitteru -1jitterk -1jitterd -1jitterp) are specified in time format. By default the number indicate seconds, while a postfix of "m" and "u" indicates milli and micro seconds respectively.

Jitter values

The jitter file is a white space separated list of jitter values given as numbers in ms. Note that only the first 10 thousand entries will be processed from the file.

NOTES

You must be root to run the emulator client.

EXAMPLES

To implement 10 ms delay, and 1% loss ratio:

nemu -reset -1delay 10m -1closs 1

To implement 20 ms delay plus a queue build-up every minute, with build-up and drain time of 1 sec, a keep time of 10 sec, and 30% loss during the keep time, and 100 ms queue size:

nemu -reset -1delay 20m -1jitter 100m -1jitterl 30 -1jitteru 1 -1jitterk 10 -1jitterd 1 -1jitterp 60

To implement 5 consecutive frame loss every minute:

nemu -reset -1bloss 100 -1blossm 5 -1blossl 1 -1blossp 60

SEE ALSO

ntools, nemud

AUTHOR

Norbert Vegh,

COPYRIGHT

ntools is (C) 2002-2010 Norbert Vegh.

The program was originally developed in Telia Research AB.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.