man tcpreplay (Commandes) - Replay network traffic stored in pcap files
NAME
tcpreplay - Replay network traffic stored in pcap files
SYNOPSIS
tcpreplay
[-flag [value]]... [--opt-name [[=| ]value]]...
<pcap_file(s)>
tcpreplay is a tool for replaying network traffic from files saved with tcpdump or other tools which write pcap(3) files.
DESCRIPTION
This manual page documents, briefly, the tcpreplay command. The basic operation of tcpreplay is to resend all packets from the input file(s) at the speed at which they were recorded, or a specified data rate, up to as fast as the hardware is capable.
Optionally, the traffic can be split between two interfaces, written to files, filtered and edited in various ways, providing the means to test firewalls, NIDS and other network devices.
OPTIONS
- -d number, --dbug=number
- Enable debugging output. This option may appear up to 1 times. The default number for this option is: 0 If configured with --enable-debug, then you can specify a verbosity level for debugging output. Higher numbers increase verbosity.
- -v, --verbose
- Print decoded packets via tcpdump to STDOUT. This option may appear up to 1 times.
- -A string, --decode=string
- Arguments passed to tcpdump decoder. This option may appear up to 1 times. This option must appear in combination with the following options: verbose. When enabling verbose mode (-v) you may also specify one or more additional arguments to pass to tcpdump to modify the way packets are decoded. By default, -n and -l are used. Be sure to quote the arguments like: -A "-axxx" so that they are not interpreted by tcpreplay. The following arguments are vaild: [ -aAeNqRStuvxX ] [ -E spi@ipaddr algo:secret,... ] [ -s snaplen ]
- -c string, --cachefile=string
- Split traffic via a tcppep cache file. This option may appear up to 1 times.
- -i string, --intf1=string
- Server/primary traffic output interface. This option may appear up to 1 times.
- -I string, --intf2=string
- Client/secondary traffic output interface. This option may appear up to 1 times. This option must appear in combination with the following options: cachefile.
- -l number, --loop=number
- Loop through the capture file X times. This option may appear up to 1 times. The default number for this option is: 1
- -L, --pktlen
- Override the snaplen and use the actual packet len. This option may appear up to 1 times. By default, tcpreplay will send packets based on the size of the "snaplen" stored in the pcap file which is usually the correct thing to do. However, occasionally, tools will store more bytes then told to. By specifying this option, tcpreplay will ignore the snaplen field and instead try to send packets based on the original packet length. Bad things (TM) may happen if you specify this option.
- -m string, --multiplier=string
- Modify replay speed to a given multiple.
This option may appear up to 1 times.
This option must not appear in combination with any of the following options:
pps, mbps, oneatatime, topspeed.
Specify a floating point value to modify the packet replay speed.
Examples:
2.0 will replay traffic at twice the speed captured 0.7 will replay traffic at 70% the speed captured
- -p number, --pps=number
- Replay packets at a given packets/sec. This option may appear up to 1 times. This option must not appear in combination with any of the following options: multiplier, mbps, oneatatime, topspeed.
- -M string, --mbps=string
- Replay packets at a given Mbps. This option may appear up to 1 times. This option must not appear in combination with any of the following options: multiplier, pps, oneatatime, topspeed. Specify a floating point value for the Mbps rate that tcpreplay should send packets at.
- -t, --topspeed
- Replay packets as fast as possible. This option must not appear in combination with any of the following options: mbps, multiplier, pps, oneatatime.
- -o, --oneatatime
- Replay one packet at a time for each user input. This option must not appear in combination with any of the following options: mbps, pps, multiplier, topspeed. Allows you to step through one or more packets at a time.
- -P, --pid
- Print the PID of tcpreplay at startup.
- -V, --version
- Print version information.
- -h, --less-help
- Display less usage information and exit.
- -H, --help
- Display usage information and exit.
- -!, --more-help
- Extended usage information passed thru pager.
- - [rcfile], --save-opts[=rcfile]
- Save the option state to rcfile. The default is the last configuration file listed in the OPTION PRESETS section, below.
- - rcfile, --load-opts=rcfile, --no-load-opts
- Load options from rcfile. The no-load-opts form will disable the loading of earlier RC/INI files. --no-load-opts is handled early, out of order.
OPTION PRESETS
Any option that is not marked as not presettable may be preset by loading values from configuration ("RC" or ".INI") file(s). The homerc file is "$$/", unless that is a directory. In that case, the file ".tcpreplayrc" is searched for within that directory.
SIGNALS
tcpreplay understands the following signals:
SIGUSR1
Suspend tcpreplay
SIGCONT
Restart tcpreplay
SEE ALSO
BUGS
tcpreplay can only send packets as fast as your computer's interface, processor, disk and system bus will allow.
Replaying captured traffic may simulate odd or broken conditions on your network and cause problems.
Some operating systems by default do not allow for forging source MAC addresses. Please consult your operating system's documentation and the tcpreplay FAQ if you experiance this issue.
AUTHOR
Copyright 2000-2005 Aaron Turner
For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
Released under the Free BSD License.
This manual page was AutoGen-erated from the tcpreplay option definitions.