Menu

User Manual

Artyom Poptsov

ClusterGen User Manual

Licensed under the GNU Free Documentation License, version 1.3 or later.



Installation

Building From the Sources

To build pktd, do the following:

$ cd clustergen/pktd
$ ./configure
$ make

For general instructions for building pktd see pktd/INSTALL.

To build ClusterGen, you must have Apache Ant and Java Development Kit (JDK) installed. Then, you can build ClusterGen as following:

$ cd clustergen/ClusterGen
$ ant

jar-file will be placed in clustergen/ClusterGen/dist/

Make sure that you're using the Linux kernel with pktgen

To use a host to generate traffic, the Linux kernel should be compiled with pktgen. Most of current kernels are shipped with pktgen 2.74. Check that pktgen module is available:

$ lsmod | grep pktgen

In case that your distro has got a kernel without pktgen, you have to either change the distro or configure and compile a kernel by your own.

Kernel configuration can be done through menuconfig:

$ cd kernel-sources/
$ make menuconfig

Enable the following:

-> Networking support
  -> Networking options 
    -> Network testing
       < > Packet Generator (USE WITH CAUTION)

Then compile the kernel as usual:

$ make
$ make modules_install

See common instructions for building the kernel for more detailed information.

If you want to use some features of pktgen 2.75 such as packet calculation on the reciever side or precise traffic control, you have to download new pktgen version. You can found it on the Daniel Turull's web site.

How To Use

Start the Application

First of all, if pktgen is compiled as a module, you should load it with

$ modbrobe pktgen

or

$ insmod pktgen.ko

Load the module on hosts that should participate in traffic generation.

Then load pktd daemon on these hosts. Note that pktgen must be run with superuser rights to be able to communicate with the pktgen driver:

$ su -
# pktd

pktd listens connections from ClusterGen on port number 10101 by default. You can set a custom port by passing it to pktd from the command line:

# pktd 11100

Start ClusterGen Java application on the control host:

$ java -jar ClusterGen.jar

Add Hosts

You can add hosts to the configuration through the "Add host" button. ClusterGen will load information about a new host (CPU cores, network interfaces) as soon as the host becomes available through the network.

There is a color indicator near the every host name. Here is the explanation what do the color means:

  • Red color means that host is not available (for example, if there is no connection to the host).
  • Orange color means that host is accessible through a network, but can't be used for traffic generation due to some reason (for example, if ClusterGen can't get information about a host because there is no loaded pktgen module on it).
  • Green color tells that host is online and can be configured to generate traffic.

Configure Target

The target configuration is a set of traffic parameters such as packet size, count of packets to be sent, destination for packets and so on. To configure a target select "Configure Target..." in File menu, or push the button "Configure Target" next to host list.


File Menu Target Configuration Dialog

Here are some of the parameters that pktgen understands:

Parameter Description
count Count of packets to be sent
dst Destination of the traffic
dst_mac MAC destination address
src_mac MAC source address. If omitted it's automatically will be taken from a source device
udp_src_min UDP source port, minimum value. If minimum port number is less than value of udp_src_max, then cycle through the port range.
udp_src_max UDP source port, maximum value.
udp_dst_min UDP destination port, minimum value. If minimum port number is less that value of udp_dst_max, then cycle through the port range.
delay Artifical gap inserted between packets (in nanoseconds)
clone_skb The number of times that socket buffer (skb) should be cloned before allocating a new data. Zero means that skb is allocated for every packet. Cloning skb is more effective, because we avoid extra memory allocation, so it has positive impact on the speed of packet generation.
ratep Needed traffic intensity in packets per second (pps). Allows to control traffic precisely. (works only with pktgen 2.75)
rate Needed traffic intensity in megabits per second (Mbps) Allows to control traffic precisely. (works only with pktgen 2.75)

For more information, see Robert Olsson's article on pktgen (pdf, 124 KB).

Calculate Packet Losses (works only with pktgen 2.75)

You have to have pktgen v2.75 on your transmitters (generators), as well as on the receiver side. Packet losses calculation can be enabled by selecting "Calculate Losses" in the "Tools" menu.

Advanced Mode

The new mode was introduced in ClusterGen 2.0 and it allows to aggregate configurations in collections called "Test Suites". A test suite is consists of a set of test cases. Currently a test case is just a target configuration and list of hosts -- that is, there is no way to set conditions for passing/failing test cases. This functionality will be added during the next ClusterGen releases.


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.