- Advanced Options
- Special Instructions for Windows
- Need Help?
- Latest stable release:
- Previous release:
- Old Win32 release
- Note that Windows is not supported by the maintainer
- Complete list of past releases
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.
- Download via GitHub
git clone https://github.com/appneta/tcpreplay
- Or if you plan to contribute someday simply fork the repo and submit a pull request when you are ready to share your changes with us
- Or download the latest master tarball
- Note that master is always production ready, but not necessarily the latest stable release. See GitHub network to see the state of master
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
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 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/
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:
- –enable-debug – useful for debugging bugs and crashes.
- –enable-64bits – use 64 bit counters to handle large pcap files & looping
- –enable-libnet – link to libnet. Note that libnet support has been deprecated due to various bugs which have not been fixed in over a year.
- –with-libnet – specify root path to libnet (something like –with-libnet=/usr/local)
- –with-libpcap – specify root path to libpcap
- –with-netmap – specify root path to netmap
- –with-tcpdump – specify path to tcpdump executable
- –enable-tcpreplay-edit – compile tcpreplay with packet editing support
You can also manually select a particular method to inject packets:
- –enable-force-pf – force tcpreplay to use Linux’s PF_PACKET to send packets
- –enable-force-bpf – force tcpreplay to use Free/Net?/OpenBSD or OS X’s BPF interface to send packets
- –enable-force-libnet – force tcpreplay to use Libnet to send packets
- –enable-force-inject – force tcpreplay to use Libpcap’s pcap_inject() API to send packets
- –enable-force-sendpacket – force tcpreplay to use Libpcap’s pcap_sendpacket() API to send packets
If you’re having compatibility issues with a system-installed GNU Autogen, you may want to consider these options:
- –disable-local-libopts – Don’t use the libopts tearoff supplied with tcpreplay (default is enabled)
- –disable-libopts-install – don’t install the libopts library files
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
flag, but use all lowercase:
After that, for the most part things should just work. There are some caveats; a few
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.