tcpreplay.1 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. .TH TCPREPLAY 1 2005-07-28 "" "Programmer's Manual"
  2. .\" DO NOT EDIT THIS FILE (tcpreplay.1)
  3. .\"
  4. .\" It has been AutoGen-ed Thursday July 28, 2005 at 09:53:37 PM PDT
  5. .\" From the definitions tcpreplay_opts.def
  6. .\" and the template file agman1.tpl
  7. .\"
  8. .SH NAME
  9. tcpreplay \- Replay network traffic stored in pcap files
  10. .SH SYNOPSIS
  11. .B tcpreplay
  12. .\" Mixture of short (flag) options and long options
  13. .RB [ -\fIflag\fP " [\fIvalue\fP]]... [" --\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
  14. .br
  15. .in +8
  16. <pcap_file(s)>
  17. .PP
  18. tcpreplay is a tool for replaying network traffic from files saved with
  19. tcpdump or other tools which write pcap(3) files.
  20. .SH "DESCRIPTION"
  21. This manual page documents, briefly, the \fBtcpreplay\fP command.
  22. The basic operation of tcpreplay is to resend all packets from the
  23. input file(s) at the speed at which they were recorded, or a specified
  24. data rate, up to as fast as the hardware is capable.
  25. Optionally, the traffic can be split between two interfaces, written to
  26. files, filtered and edited in various ways, providing the means to test
  27. firewalls, NIDS and other network devices.
  28. .SH OPTIONS
  29. .TP
  30. .BR -d " \fInumber\fP, " --dbug "=" \fInumber\fP
  31. Enable debugging output.
  32. This option may appear up to 1 times.
  33. The default \fInumber\fP for this option is:
  34. .ti +4
  35. 0
  36. .sp
  37. If configured with --enable-debug, then you can specify a verbosity
  38. level for debugging output. Higher numbers increase verbosity.
  39. .TP
  40. .BR -v ", " --verbose
  41. Print decoded packets via tcpdump to STDOUT.
  42. This option may appear up to 1 times.
  43. .sp
  44. .TP
  45. .BR -A " \fIstring\fP, " --decode "=" \fIstring\fP
  46. Arguments passed to tcpdump decoder.
  47. This option may appear up to 1 times.
  48. This option must appear in combination with the following options:
  49. verbose.
  50. .sp
  51. When enabling verbose mode (\fB-v\fP) you may also specify one or more
  52. additional arguments to pass to \fBtcpdump\fP to modify the way packets
  53. are decoded. By default, -n and -l are used. Be sure to
  54. quote the arguments like: -A "-axxx" so that they are not interpreted
  55. by tcpreplay. The following arguments are vaild:
  56. [ -aAeNqRStuvxX ]
  57. [ -E spi@ipaddr algo:secret,... ]
  58. [ -s snaplen ]
  59. .TP
  60. .BR -c " \fIstring\fP, " --cachefile "=" \fIstring\fP
  61. Split traffic via a tcppep cache file.
  62. This option may appear up to 1 times.
  63. .sp
  64. .TP
  65. .BR -i " \fIstring\fP, " --intf1 "=" \fIstring\fP
  66. Server/primary traffic output interface.
  67. This option may appear up to 1 times.
  68. .sp
  69. .TP
  70. .BR -I " \fIstring\fP, " --intf2 "=" \fIstring\fP
  71. Client/secondary traffic output interface.
  72. This option may appear up to 1 times.
  73. This option must appear in combination with the following options:
  74. cachefile.
  75. .sp
  76. .TP
  77. .BR -l " \fInumber\fP, " --loop "=" \fInumber\fP
  78. Loop through the capture file X times.
  79. This option may appear up to 1 times.
  80. The default \fInumber\fP for this option is:
  81. .ti +4
  82. 1
  83. .sp
  84. .TP
  85. .BR -L ", " --pktlen
  86. Override the snaplen and use the actual packet len.
  87. This option may appear up to 1 times.
  88. .sp
  89. By default, tcpreplay will send packets based on the size of the "snaplen"
  90. stored in the pcap file which is usually the correct thing to do. However,
  91. occasionally, tools will store more bytes then told to. By specifying this
  92. option, tcpreplay will ignore the snaplen field and instead try to send
  93. packets based on the original packet length. Bad things (TM) may happen if
  94. you specify this option.
  95. .TP
  96. .BR -m " \fIstring\fP, " --multiplier "=" \fIstring\fP
  97. Modify replay speed to a given multiple.
  98. This option may appear up to 1 times.
  99. This option must not appear in combination with any of the following options:
  100. pps, mbps, oneatatime, topspeed.
  101. .sp
  102. Specify a floating point value to modify the packet replay speed.
  103. Examples:
  104. .nf
  105. 2.0 will replay traffic at twice the speed captured
  106. 0.7 will replay traffic at 70% the speed captured
  107. .fi
  108. .TP
  109. .BR -p " \fInumber\fP, " --pps "=" \fInumber\fP
  110. Replay packets at a given packets/sec.
  111. This option may appear up to 1 times.
  112. This option must not appear in combination with any of the following options:
  113. multiplier, mbps, oneatatime, topspeed.
  114. .sp
  115. .TP
  116. .BR -M " \fIstring\fP, " --mbps "=" \fIstring\fP
  117. Replay packets at a given Mbps.
  118. This option may appear up to 1 times.
  119. This option must not appear in combination with any of the following options:
  120. multiplier, pps, oneatatime, topspeed.
  121. .sp
  122. Specify a floating point value for the Mbps rate that tcpreplay
  123. should send packets at.
  124. .TP
  125. .BR -t ", " --topspeed
  126. Replay packets as fast as possible.
  127. This option must not appear in combination with any of the following options:
  128. mbps, multiplier, pps, oneatatime.
  129. .sp
  130. .TP
  131. .BR -o ", " --oneatatime
  132. Replay one packet at a time for each user input.
  133. This option must not appear in combination with any of the following options:
  134. mbps, pps, multiplier, topspeed.
  135. .sp
  136. Allows you to step through one or more packets at a time.
  137. .TP
  138. .BR -P ", " --pid
  139. Print the PID of tcpreplay at startup.
  140. .sp
  141. .TP
  142. .BR -V ", " --version
  143. Print version information.
  144. .sp
  145. .TP
  146. .BR -h ", " --less-help
  147. Display less usage information and exit.
  148. .sp
  149. .TP
  150. .BR \-H , " \--help"
  151. Display usage information and exit.
  152. .TP
  153. .BR \-! , " \--more-help"
  154. Extended usage information passed thru pager.
  155. .TP
  156. .BR \- " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
  157. Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
  158. configuration file listed in the \fBOPTION PRESETS\fP section, below.
  159. .TP
  160. .BR \- " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " --no-load-opts"
  161. Load options from \fIrcfile\fP.
  162. The \fIno-load-opts\fP form will disable the loading
  163. of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
  164. out of order.
  165. .SH OPTION PRESETS
  166. Any option that is not marked as \fInot presettable\fP may be preset
  167. by loading values from configuration ("RC" or ".INI") file(s).
  168. The \fIhomerc\fP file is "\fI$$/\fP", unless that is a directory.
  169. In that case, the file "\fI.tcpreplayrc\fP"
  170. is searched for within that directory.
  171. .SH "SIGNALS"
  172. tcpreplay understands the following signals:
  173. .sp
  174. .IR "\fBSIGUSR1\fP"
  175. Suspend tcpreplay
  176. .sp
  177. .IR "\fBSIGCONT\fP"
  178. Restart tcpreplay
  179. .br
  180. .SH "SEE ALSO"
  181. tcpdump(1), tcpprep(1), tcprewrite(1), libnet(3)
  182. .SH "BUGS"
  183. tcpreplay can only send packets as fast as your computer's interface,
  184. processor, disk and system bus will allow.
  185. Replaying captured traffic may simulate odd or broken conditions on your
  186. network and cause problems.
  187. Some operating systems by default do not allow for forging source MAC
  188. addresses. Please consult your operating system's documentation and the
  189. tcpreplay FAQ if you experiance this issue.
  190. .SH AUTHOR
  191. Copyright 2000-2005 Aaron Turner
  192. For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
  193. .PP
  194. Released under the Free BSD License.
  195. .PP
  196. This manual page was \fIAutoGen\fP-erated from the \fBtcpreplay\fP
  197. option definitions.