[ Home > Software > pingspray ]

pingspray - heavily load the network for evaluation purpose

Description

This program was mainly intended to load the LAN interface for EMC (electromagnetic compatibility) tests, and it can generate both random and periodic patterns of data as suggested in some EMC standards.

As far as the EUT (equipment under test) is configured to respond to ICMP echo request, you don't have to run this program on the EUT itself, but you can connect an another computer with the EUT via Ethernet usually through a hub and specify the EUT's IP address as the target address. It uses ICMP echo request (ping) to generate the traffic, and when it works as intended, it will generate traffic in both directions (transmit and receive).

It will try to very heavily load, or flood, the network with large ICMP echo packets and can slowing down or even disabling the network, so shouldn't be used in the networks in operation or to the other person's computers.

This program is provided "as is" without warranty of any kind.

Background

CISPR 22:2008 clause 9.6.3 says:
In order to make reliable emission measurements representative of high LAN utilization it is only necessary to create a condition of LAN utilization in excess of 10 % and sustain that level for a minimum of 250 ms. The content of the test traffic should consist of both periodic and pseudo-random messages in order to emulate realistic types of data transmission (e.g. random: files compressed or encrypted; periodic: uncompressed graphic files, memory dumps, screen updates, disk images). If the LAN maintains transmission during idle periods measurements shall also be made during idle periods (see Clause E.3, [7]).
So, maybe it is useful to have a program which can make high LAN utilization conditions with both of periodic and random data, and also low LAN utilization conditions.

Usage

pingspray [ -F pattern ] [ -P duration ] [ <ping options> ] <target>

Example

Here are some example how to run pingspray, assuming that the destination IP address is 192.168.254.254 which must be modified accordingly.

pingspray 192.168.254.254
To the specified target 192.168.254.254, (1) repeatedly send 50000 bytes of packets filled with random data for 300 ms, (2) repeatedly send 50000 bytes of packets filled with 100 all-0 bytes (0x00) and 100 all-1 bytes (0xff) for 300 ms, (3) don't send packets for 300 ms, and (4) repeat them.

pingspray -P 1000 192.168.254.254
Similar to the above, but the duration is set to 1000 ms instead of the default value of 300 ms.

pingspray -s 1000 -F 01 192.168.254.254
(1) repeatedly send 1000 bytes of packets filled with all-0 bytes, (2) repeatedly send 1000 bytes of packets filled with all-1 bytes, and (3) repeat them.

ping -f -l 3 -s 50000 192.168.254.254
If you don't need to specify data pattern, you can probably use normal ping command instead, too.

Install

Install from Source

  1. Download pingspray-0.2.tar.gz
  2. tar xzf pingspray-0.2.tar.gz
  3. cd pingspray-0.2
  4. make
  5. make install

Linux Binary

Install

  1. Download the Linux binary of pingspray on the computer
  2. Open a terminal window
  3. Go to the directory where the binary was downloaded (e.g., cd Downloads)
  4. su
  5. mv pingspray /usr/local/bin/
  6. chown root.root /usr/local/bin/pingspray
  7. chmod a+x,u+s /usr/local/bin/pingspray

Fedora Live

  1. Download the Linux binary of pingspray on the computer
  2. Open a terminal window
  3. Go to the directory where the binary was downloaded (e.g., cd Downloads)
  4. chmod a+x pingspray
  5. su
  6. ./pingspray 192.168.254.254

Ubuntu Live

  1. Download the Linux binary of pingspray on the computer
  2. Open a terminal window
  3. Go to the directory where the binary was downloaded (e.g., cd Downloads)
  4. chmod a+x pingspray
  5. sudo ./pingspray 192.168.254.254

System Requirements

This program was tested on Fedora 14 (Linux 2.6), Fedora 18 (Linux 3.6) and Ubuntu 12 (Linux 3.2).

This program requires privileges as root to operate as intended, so the command should usually be setuid root or should explicitly run as root user.

If you don't want to install Linux, you can also run this program on Live Linux systems. Again, you don't have to run this program on the EUT itself.

Troubleshooting

Transmit rate (TX) stays 0.0 Mbps

Maybe the destination IP address is not reachable or the destination is refusing to respond to ICMP echo request. In these cases, I think the destination will not respond to normal ping either.

Possible reasons include: incorrect cabling, incorrect network setting on either of the units, wrong IP address specified when invoking the pingspray command, or stringent firewall setting.

Receive rate (RX) is significantly smaller than transmit rate (TX)

pingspray usually use multiple preloading and large packet size for higher LAN utilization, but maybe the size is too large in some situations. In this case, specifying small preload with -f option and/or specifying small packet size with -s option may help solve the problem. See also Example section for how to use the -s option.

If the destination didn't respond to normal ping either, check the network connection and setting first.

Fluctuating transmit and receive rate

Some Ethernet chips or drivers report statistical data once per second, which make pingspray to report like this:
   0 - random    .     (TX:  214.6 Mbps    0 errs  RX:  213.2 Mbps    0 errs)
   1 - 0x00/0xff       (TX:    0.0 Mbps    0 errs  RX:    0.0 Mbps    0 errs)
   2 - silent          (TX:    0.0 Mbps    0 errs  RX:    0.0 Mbps    0 errs)
   0 - random    .     (TX:  217.2 Mbps    0 errs  RX:  217.1 Mbps    0 errs)
   1 - 0x00/0xff       (TX:    0.0 Mbps    0 errs  RX:    0.0 Mbps    0 errs)
Usually, this is not really a problem.

It didn't run on Microsoft Windows

pingspray is intended to run on Linux operating systems as described in the System Requirements above, and I am not going to transport it to other operating systems especially to Microsoft Windows of any versions.

If you don't have Linux machines, maybe you can run it on Live Linux systems. Please note that you don't have to run this program on the EUT itself.

Change Log

Version 0.1 (2013-04-14)
Version 0.2 (2013-05-06)

Related Software

Author

Tom Sato, http://homepage3.nifty.com/tsato/, e-mail: VEF00200@nifty.ne.jp.

The program is derived from iputils (snapshot s20121221), and distributed under the same conditions with the original iputils. The copyright notice can be found in ping.c in the source package.


Tom Sato, 2014-04-14