You need to enable JavaScript to fully utilise this page.

LINUXPS

Return to active probing software page

Section: Active Probing Manual (8)
Updated: Thu Apr 03 2002
Jump to Index  

NAME

linuxps - linux packet sender and receiver  

SYNOPSIS

linuxps receiver_host receiver_port

linuxSend probe_stream_file

tsclinuxps receiver_host receiver_port

tsclinuxSend probe_stream_file count time

tscreceive port_number tscdt_output_file  

DESCRIPTION

The linuxps software package is used to support active probing of networks. By active probing we mean the injection of artifical probe traffic into the network which can then be measured and the characteristics analysed at different points. The basic components of the active probing infrastructure are:

The Sender which creates and transmits the probe stream.

The Receiver which is the sink, and terminates the probe stream.

The Sender Monitor which records packet departure times from the Sender.

The Receiver Monitor which records arrival times to the Receiver.

Arrival and depature timestamps are generated after receiving the whole packet. These timestamps can be generated based on a number of different time sources (i.e. clocks). The standard linux sender solution, linuxps and linuxSend, use the standard software clock ( gettimeofday() ). However due to many different factors, timestamps generated using these clocks are prone to a number of effects which can significantly affect their accuracy. A much more reliable and quicker method of obtaining timestamps is implemented via the CPU clock cycle register, known as the TSC (Time Stamp Counter) and is implemented in the TSC linux sender solution, tsclinxps and tsclinuxSend. As sender monitor, tcpdump or the modified tsctcpdump can be used (if using the modified kernel/driver).

As receiver and receiver monitor for the standard linux solution, tcpdump can be used to listen on a particular port. If using the TSC linux modified kernel, then more accurate timestamps can be obtained by using the tscreceive program as receiver. Again, tcpdump or the modified tsctcpdump can be used as a receiver monitor, but this will reveal the same received timestamps as tscrecieve, which relies on the timestamps generated by the modified NIC driver or the kernel which are accessed via an ioctl system call.

When using any of the TSC based Sender or Receiver solutions, the tscskewd daemon must be running in order to provide the current conversion constant.  

OPTIONS

receiver_host
The address of the host to which the packets are to be sent
receiver_port
The port number which packets are sent to on the receiving host
probe_stream_file
A file outlining how to send probe steams. This should be a binary file which contains 64 bit floating point (C:double) arrays with num_of_probes x 3 elements (time, size, ttl).
count
The value of count (CPU clock cycles) as reported by tscskewd
time
The value of time (microseconds) as reported by tscskewd
tscdt_output_file
TSC counter values records as produced by the tscreceive program. These can then be converted to standard time using post-processing utilities.
 

EXAMPLE USAGE

Assume 10.0.0.1:7775 is the Receiver and 192.168.0.1 is the Sender.

Start tcpdump on the Receiver (for a standard linux reciever):

tcpdump -n port 7775

Or start tscreceive on the Receiver (for a TSC based receiver):

tscreceiver 7775 receive_tsctimestampfile.tscdt

Next either start the standard linux packet sender on the Sender host:

linuxps 10.0.0.1 7775

Or start the TSC based linux packet sender on the Sender host:

tsclinuxps 10.0.0.1 7775

In order to now send packets via the packet sender you will need to open another terminal on the sender and use the sending application to deliver the timing information to the packet sender. This is done as follows for the standard linux Sender:

linuxSend probe_stream.bin

Or if using the TSC based linux packet sender:

tsclinuxSend probe_stream.bin <count> <time>

Where <count> and <time> are the values reported by tscskewd on the Sender.

If you have tcpdump running on the Receiver you should then see some output which indicates that you have received UDP packets on port 7775 from the Sender host (in this case 192.168.0.1). Using the tscreceive program, you should see some entries in the receive_timestampfile.tscdt.  

PROBE STEAM DEFINITION FILE

In general the packets of a probe stream can be defined by their:

- packet type
- packet size
- departure time
- time to live ( max. number of hops )

The sender tools in this package are using UDP packets with a packet serial number placed into the first four bytes of the UDP payload. As a result of this the packet size typically can be varied between 32 and 1500 bytes. The time to live field of probes which are meant to reach the receiver should be set to -1.

This package is using the '.bin' binary file format to store probe stream definitions. These files are 64 bit floating point (C: double) arrays with num_of_probes x 3 elements (time, size, ttl).

New probe stream files can be easily created using Matlab or simple C programs.

To create a probe stream using Matlab just follow these steps:

1. p      = ones(<num_of_probes>, 3);
2. p(:,1) = <inter_departure_time_vector>;
3. p(:,2) = <packet_size_vector>;
4. p(:,3) = <ttl_vector>;                    // usually just -1

and save p as a double precision binary file using for example

5. pswrite('teststream.bin',p);

where pswrite is a simple Matlab function (pswrite.m):

function y = pswrite(x,a)
% pswrite - creates a binary file of timing information
%           for rtSend and linuxSend applications
%
% pswrite('filename',idt_array)
%
% idt_array - array of inter departure times
%
fid = fopen(x,'wb');
fwrite(fid,a,'double');
y   = fclose(fid);

Note: if you are running Matlab on a diffent platform you may encounter problems due to the different 'double' representations (eg. bit order)  

OUTPUT FILE FORMATS

.tscdt
TSC based counter value stamps created by tscreceive combined Receiver and Receiver Monitor application
.dt
This is a standard timestamp file. Each timestamp is stored in 64 bits using 32bit.32bit format (sec:remainder). The first value of the file is 1 (for compatibility with PSIM), which is followed by num_of_probes timestamps in the format specified about. Lost packets are represented as -1 ( 0xffffffffffffffff )

Some Matlab files supporting the post-processing of .dt files are available to analyse the results of active probing experiments.  

FILES

linuxps, tsclinuxps, linuxSend, tsclinuxSend, tscreceive  

SEE ALSO

tscskewd(8), readtscskew(1), tcpdump(8)  

AUTHORS

Created by: Attila Pasztor <attila@cubinlab.ee.unimelb.edu.au>,
Updated by: David Smith    <djps@cubinlab.ee.unimelb.edu.au> and
            Campbell Skene <crsk@cubinlab.ee.unimelb.edu.au>
 

REPORTING BUGS

Report bugs/comments to the CUBINlab Probing Team <http://www.cubinlab.ee.unimelb.edu.au/probing/>.  

COPYRIGHT

Copyright © 2003 Attila Pasztor, David Smith, Campbell Skene. Distributed under GPL. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLE USAGE
PROBE STEAM DEFINITION FILE
OUTPUT FILE FORMATS
FILES
SEE ALSO
AUTHORS
REPORTING BUGS
COPYRIGHT

This document was created by man2html, using the manual pages.
Time: 05:06:25 GMT, April 04, 2003