University of Naples

 

Federico II

 

 

 

 

 

5 August, 2002

 

Copyright © 2002: Stefano Avallone

 

Permission is granted to use or distribute but not to sell

 

Version 1.1: added a new distribution for packet generation process

 

Mtools: an UDP traffic generator

 

download

 

 

Mtools is a collection of tools for measuring network performances. It is made up of two instruments:

 

*  One-way-delay Meter

*  Round-trip-time Meter

 

Mtools works under Linux and FreeBSD operating systems.

 

One-way-delay Meter

 

One-way-delay Meter (OWDM) enables to send UDP packets to a specific host and measure the transmission time of each packet. All the information associated to each packet is stored in a log file, whose format is compliant with that of MGEN`s [1] log file, so it is possible to use MGEN`s powerful utilities to analyze log files and obtain statistics, delay and bit rate graphs and so on.

OWDM main features are:

* it is easily extensible to support a wide variety of traffic source models, thanks to the Newran [2] random number generator library (included in Mtools distribution)

* it is possible to specify the seed value of the random process that generates packets inter-departures, so as to repeat many times the same realization of the packet generation random process (useful for comparing different network configurations)

* it is possible to generate randomly sized packets (and specify a seed value for this process)

* sender can record packets transmission times, so as to get the bit rate graph of generated traffic

OWDM is constituted by a sender and a receiver.

OWDM sender can be used both in script mode and command line mode. The syntax in script mode is:

   owdmSend <script file> [<log file>]

where script file is the file that contains the specification of the flows to be generated (a flow for each line except blank lines and lines beginning with `#`). Each flow is assigned a flow identifier equal to the number of the line of the script file in which it is specified. The syntax of each line is the same as that used in command line mode (described later on). If log file is specified, OWDM sender records packets transmission times in a MGEN-compliant log file, in order to analyze generated traffic.

In command line mode you can generate only one flow. You have to type:

   owdmSend [options]

Available options are:

 -a <dest_address>

Specify destination host (both dotted decimal notation and host name are accepted). Default is localhost (127.0.0.1)

 -p <dest_port>

Specify destination port. Default is 8999

 -b <DS_byte>

Set DS byte in IP header. Default is 0

 -C <pkts_per_sec>

Specify that packets inter-departure is a constant (equal to the inverse of pkts_per_sec). This is the default mode for packet generation process and the default value for pkts_per_sec is 100

 -U <min_pps> <max_pps>

Specify that packets inter-departure is an uniformly distributed random variable between 1/max_pps and 1/min_pps

 -E <average_pps>

Specify that packets inter-departure is an exponentially distributed random variable with mean 1/average_pps. In this case, packet generation process is a gaussian process

 -V <shape> <scale>

Specify that the time (in milliseconds) between the transmission of two consecutive packets is modeled as a Pareto distributed random variable with the specified parameters

 -c <pkt_size>

Specify that UDP packets payload size is a constant (equal to pkt_size bytes). This is the default mode and the default value for pkt_size is 1000 bytes

 -u <min_ps> <max_ps>

Specify that UDP packets payload size is an uniformly distributed random variable between min_ps bytes and max_ps bytes

 -e <average_ps>

Specify that UDP packets payload size is an exponentially distributed random variable with mean average_ps bytes

 -s <seed>

Set the seed for the random number generator. Default is a random value (taken from time of day)

 -t <duration>

Specify the generation duration in milliseconds. Default is 10 seconds

 -d <delay>

Specify an amount of time (in milliseconds) to wait before the flow starts. Default value is 0

 -l [<log file>]

This option is only available in command line mode and it is used to record packets transmission times. Default value for log file is `/tmp/owdmSend.log`

 

If no options are specified, a help screen will be displayed.

OWDM receiver must be invoked in the following manner:

   owdmRecv [options]

Available options are:

 -p <ports>

Specify port numbers on which owdmRecv will listen for packets. It is possible to specify a range of ports using a `:` delimeter (e.g. 5000:5002 stands for 5000 5001 5002); port numbers or port ranges must be separated by white spaces. Default port number is 8999

 -l <log file>

Specify the name of log file. Default is `/tmp/owdmRecv.log`

 -h

Print an help screen

 

Note that if you invoke owdmRecv without options, it will monitor port 8999 and write log info in `/tmp/owdmRecv.log`.

 

Round-trip-time Meter

 

Round-trip-time Meter (RTTM) enables to transmit UDP packets to a specific host, which sends them back to the sender. It is possible to log both packets arrived at the receiver and packets returned at the sender. RTTM has the same features of OWDM and differs slightly in the usage.

RTTM sender can be used both in script mode and command line mode. The syntax in script mode is :

   rttmSend <script file> [<log file>]

where script file is the file that contains the specification of the flows to be generated (same format as an OWDM script). Packets returned at the sender are logged into log file; if it is not specified, the default value `/tmp/rttmSend.log` is used.

In command line mode you can generate only one flow. You have to type:

   rttmSend [options]

Available options are the same as those of OWDM sender. The only difference regards -l option (valid only in command line mode): if it is not specified, the default value `/tmp/rttmSend.log` is used; if it is present, a log file name must be specified.

RTTM receiver must be invoked in the following manner:

   rttmRecv [options]

Available options are the same as those of OWDM receiver. The only difference regards -l option: by default, packets arrived at the receiver are not logged; if the -l option is present they are logged (in the specified file or, if no file name is specified, in the default file `/tmp/rttmRecv.log`).

 

Installation notes

 

*   Decompress Mtools package

             tar xzvf Mtools.tar.gz

*   Decompress Newran random number generator library

              cd Mtools

      mkdir newran

      cd newran

      tar xzvf ../newran02.tar.gz

*   Apply the patch

      patch -p1 < ../newran-ste.diff    

*   Compile Newran library

             make -f newran-ste.mak

*   Back to Mtools directory

             cd ..

*   Compile Mtools

             make -f Makefile.Linux    (for Linux OS)

      make -f Makefile.FreeBSD  (for FreeBSD OS)

             

E-mail me questions, bugs, suggestions, enhancements...

 

 

References

[1] Naval Research Laboratory (NRL), The MGEN Toolset on http://manimac.itd.nrl.navy.mil/MGEN/

[2] Robert Davies, Newran02B a random number generator library on http://www.robertnz.net/nr02doc.htm