TrafGen
Keywords:
traffic generator udp tcp
Functions
TrafGen generates and
receives various types of traffic to measure actively the performances
of the network.
Transmissions are possible in
UDP (unicast or multicast), TCP, RTP, HTTP, DNS on the same machine or
between 2 different machines. In UDP mode, generation of traffic is
done continuously or according to statistical models (Poisson or
M/Pareto).
For multi-media
transmissions
(RTP flows) ,
javaMediaFramework 2.1 is necessary.
TrafGen can be used in
interactive mode (swing) or in command mode. For benefiting from all its
features, using java virtual machine JRE 1.4 is necessary:
http://java.sun.com .
TrafGen
downloading.
Command Mode
In command mode, TrafGen is
launched by typing the following command:
java { - classpath TrafGen.jar
} TrafGen [ param1=value1 [ param2=value2 ]... ]
The parameters available are:
- Running mode:
- snd, rcv, sndrcv (UDP)
- HTTP, RTP, mCastRcv
- The type of traffic:
- constant (by default)
- poisson, mpareto
- Options:
- lport - dport - peer - size-
dgramperiod - loop - stateperiod - tos
- slip by (file
containing the list of URL for HTTP, URL towards the multi-media source
for RTP).
List options with the default
value between brackets
- size=datagram size in bytes
(1024)
- peer=address or
hostname of the peer (127.0.0.1)
- dport=peer
port (1048)
- lport=local port
(1048)
- dgramperiod=period for
sending datagrams in milliseconds (0 for continuous emission)
- stateperiod=statistics
periodicity (in seconds)
- file=file containing a
list of urls (HTTP)
- loop=emission loops,
0: infinite loop, (1 000 000)
- tos=type of
service
- ttl=time to live
(1: only for multicast)
- poisson=poisson mean
- mpareto=pareto
scale:pareto shape:poisson mean
Example of generation of traffic:
java -cp trafGen.jar
TrafGen size=1024 dport=1048 loop=100 peer=157.159.100.129
stateperiod=1000 mode=sndrcv mpareto=30:1.5:100
Example RTP:
java -cp trafGen.jar TrafGen
mode=rtp file=file:///C:/vincent/java/TrafGen/test/pv.mp3 dport=9998
peer=157.159.103.62 loop=10 stateperiod=50000
Interactive mode (Swing)
To use TrafGen with a graphical
interface, type the following command: "java - CP trafGen.jar TrafGen
swing".
The parameters are:
- localPort (which indicates the
local port),
- distPort and @ipDest ,
- dgramSize indicates
the
size of the emitted datagrams,
- Period indicates the
duration in milliseconds which separates two emissions. Period with 0
is synonymous with permanent emission.
- Loop indicates the
iteration count to be carried out, with 0 in this fields nbLoop is put
at 10**9.
- tos indicates the
value
of the field tos,
- ttl indicates the
value
of the field ttl,
- sendBuf and recvBuf
indicate the size of the plugs of emission and of reception, with 0,
the
standard value is maintained.
- sendPrio and recvPrio
indicate the priority of the threads of emission and of reception, with
0, the standard value is maintained.
- savPeriod indicates
the
duration in milliseconds between two safeguards of the meters.
- The parameters
specific
to the models of traffic are described in the previous section.
The actions are activated by
validation of a check box.
IPv6 adresses can be used while using a JVM 1.4.
< SndUdp, RcvUdp >, <
SndTcp, RcvSrvTcp > launch send-receives.
In local loop the sockets must be cross: ex:
- snd: portLocal:1048,
portDistant:1049
- rcv: portLocal:1049,
portDistant:1048.
< rcvState >, < sndState
> give the average of the traffic.
< resetRcv >, < resetSnd > put the statistics to zero.
< pingLoop > and < count > are specific to UDP.
< pingLoop > sends a message nbLoop time to measure the RTT.
< pingLoop > measures RTT in UDP mode.
Ex: pingLoop
udpSnd port 1048 ===> port 1049 udpRcv
udpRcv < = = = reply
< count > request the value
of the meter of datagrams to the distant correspondent, it goes only
with one transmitter "udpDuplex" (able to emit and receive on same the
socket).
< aleaSend > sends in a random way to a mailing list IP, employed
to create conflicts on a switch while launching trafGen from several
stations.
< SndMcast, RcvMcast > launches emissions - receptions on
multicast addresses. SndMcast reads the fields "port
source" and RcvMcast reads the fields "port destination". For a same
session, the 2 port numbers need to be identical.
< sav > save the statistics
of the active tasks, the period of saving is specified in seconds.
< HTTP > generates HTTP requests, the list of URLs is in a text
file chosen by the user.
< DNS > generates DNS requests, the list of domain names is in a
text file chosen by the user.
< duplexUdp > allows full duplex communication in UDP.
< duplexTcp > allows full duplexcommunication in TCP.
< ThreadsList > gives the list of the active threads with their
level of priority.
< ThreadsStop > stops all the threads.
For any question: pierre dot vincent at int-evry dot
fr