Tcpreplay

home

Download and Installation

Downloads

Download Releases for Users

Download Source for Developers

Compiling source from GitHub has more requirements than compiling a release. Specifically you must have AutoGen installed. If you plan to contribute you must have AutoGen version 5.16.2, otherwise your pull requests may be rejected.

If you want to help develop Tcpreplay visit our Developer Wiki.

Installation

Simple directions for Unix users

You will need to compile the source code, but first you must ensure that you have compiling tools and prerequisite software installed. For example, on a base Ubuntu or Debian system you may need to do the following:

sudo apt-get install build-essential libpcap-dev

Next extract tarball, change to root directory, then do:

./configure
make
sudo make install

Optionally you can run the tests to ensure that your installation is fully functional:

sudo make test

Installation Video

Build netmap feature

This feature will detect netmap capable network drivers on Linux and BSD systems. If detected, the network driver is bypassed for the execution duration of tcpreplay and tcpreplay-edit, and network buffers will be written to directly. This will allow you to achieve full line rates on commodity network adapters, similar to rates achieved by commercial network traffic generators.

Note As of v4.5.1, AF_XDP may be a better option since it doesn’t require Linux kernel modifications. See docs/INSTALL for details.

Note that bypassing the network driver will disrupt other applications connected through the test interface. For example, you may see interruptions while testing on the same interface you ssh’ed into.

FreeBSD 10 and higher already contains netmap capabilities and will be detected by configure. To enable netmap on the system you will need to recompile the kernel with device netmap included.

For Linux, download latest and install netmap from http://info.iet.unipi.it/~luigi/netmap/ If you extracted netmap into /usr/src/ or /usr/local/src you can build without extra configure options. Otherwise you will must specify the netmap source directory, for example:

./configure --with-netmap=/home/fklassen/git/netmap
make
sudo make install

You can also find netmap source at http://code.google.com/p/netmap/

Netmap Installation Video

Advanced Options

There are quite a few configure time options for tcpreplay which allow you to control a lot of things. Some of the more interesting ones are:

You can also manually select a particular method to inject packets:

If you’re having compatibility issues with a system-installed GNU Autogen, you may want to consider these options:

Special Instructions for Windows

Consider Windows support for Tcpreplay is experimental - beta quality if you will. We strongly recommend you read the page about how to get support for Tcpreplay.

With that said, you’ll need Cygwin to compile/run tcpreplay. You’ll also need to install Winpcap - the port of libpcap for Windows. For whatever reason, it seems important that you install the Winpcap files in the Cygwin root directory (/Wpdpack).

Be sure to install both the driver and DLL files AND developer pack. Then when you run ./configure, you’ll need to specify the location for Winpcap using the --with-libpcap flag, but use all lowercase: ./configure --with-libpcap=/wpdpack.

After that, for the most part things should just work. There are some caveats; a few features and make test don’t work, but for the most part they seem to be pretty minor.

For more detailed instructions, see the Win32Readme.txt.

Note: We’ve been informed that the guile Cygwin package is broken. This horribly breaks parts of GNU Autogen - specifically the parts which allow you to build Tcpreplay via GitHub. Hence, I strongly recommend grabbing a tarball release.

Need Help?

Having problems? Try asking for help on the tcpreplay-users mailing list or check out the Support section.