tcpreplay.1 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. .TH TCPREPLAY 1 2007-04-30 "(tcpreplay )" "Programmer's Manual"
  2. .\" DO NOT EDIT THIS FILE (tcpreplay.1)
  3. .\"
  4. .\" It has been AutoGen-ed Monday April 30, 2007 at 01:31:13 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. For more details, please see the Tcpreplay Manual at:
  29. http://tcpreplay.synfin.net/wiki/manual
  30. .SH OPTIONS
  31. .TP
  32. .BR \-q ", " \--quiet
  33. Quiet mode.
  34. .sp
  35. This option has not been fully documented.
  36. .TP
  37. .BR \-a ", " \--accurate
  38. Enable more accurate packet timing.
  39. This option may appear up to 1 times.
  40. .sp
  41. Enables more accurate timing between packets at the cost of higher
  42. CPU utilization.
  43. .TP
  44. .BR \-d " \fInumber\fP, " \--dbug "=" \fInumber\fP
  45. Enable debugging output.
  46. This option may appear up to 1 times.
  47. This option takes an integer number as its argument.
  48. The value of \fInumber\fP is constrained to being:
  49. .in +4
  50. .nf
  51. .na
  52. in the range 0 through 5
  53. .fi
  54. .in -4
  55. The default \fInumber\fP for this option is:
  56. .ti +4
  57. 0
  58. .sp
  59. If configured with \--enable-debug, then you can specify a verbosity
  60. level for debugging output. Higher numbers increase verbosity.
  61. .TP
  62. .BR \-v ", " \--verbose
  63. Print decoded packets via tcpdump to STDOUT.
  64. This option may appear up to 1 times.
  65. .sp
  66. .TP
  67. .BR \-A " \fIstring\fP, " \--decode "=" \fIstring\fP
  68. Arguments passed to tcpdump decoder.
  69. This option may appear up to 1 times.
  70. This option must appear in combination with the following options:
  71. verbose.
  72. .sp
  73. When enabling verbose mode (\fB-v\fP) you may also specify one or more
  74. additional arguments to pass to \fBtcpdump\fP to modify the way packets
  75. are decoded. By default, \-n and \-l are used. Be sure to
  76. quote the arguments like: \-A "-axxx" so that they are not interpreted
  77. by tcpreplay. The following arguments are vaild:
  78. [ \-aAeNqRStuvxX ]
  79. [ \-E spi@ipaddr algo:secret,... ]
  80. [ \-s snaplen ]
  81. .TP
  82. .BR \-C ", " \--enable-file-cache
  83. Enable caching of packets to internal memory.
  84. .sp
  85. This option has not been fully documented.
  86. .TP
  87. .BR \-c " \fIstring\fP, " \--cachefile "=" \fIstring\fP
  88. Split traffic via a tcppep cache file.
  89. This option may appear up to 1 times.
  90. .sp
  91. .TP
  92. .BR \-i " \fIstring\fP, " \--intf1 "=" \fIstring\fP
  93. Server/primary traffic output interface.
  94. This option may appear up to 1 times.
  95. .sp
  96. .TP
  97. .BR \-I " \fIstring\fP, " \--intf2 "=" \fIstring\fP
  98. Client/secondary traffic output interface.
  99. This option may appear up to 1 times.
  100. This option must appear in combination with the following options:
  101. cachefile.
  102. .sp
  103. .TP
  104. .BR \-N ", " \--listnics
  105. List available network interfaces and exit.
  106. .sp
  107. .TP
  108. .BR \-l " \fInumber\fP, " \--loop "=" \fInumber\fP
  109. Loop through the capture file X times.
  110. This option may appear up to 1 times.
  111. This option takes an integer number as its argument.
  112. The value of \fInumber\fP is constrained to being:
  113. .in +4
  114. .nf
  115. .na
  116. greater than or equal to 0
  117. .fi
  118. .in -4
  119. The default \fInumber\fP for this option is:
  120. .ti +4
  121. 1
  122. .sp
  123. .TP
  124. .BR \-S ", " \--pktlen
  125. Override the snaplen and use the actual packet len.
  126. This option may appear up to 1 times.
  127. .sp
  128. By default, tcpreplay will send packets based on the size of the "snaplen"
  129. stored in the pcap file which is usually the correct thing to do. However,
  130. occasionally, tools will store more bytes then told to. By specifying this
  131. option, tcpreplay will ignore the snaplen field and instead try to send
  132. packets based on the original packet length. Bad things (TM) may happen if
  133. you specify this option.
  134. .TP
  135. .BR \-L " \fInumber\fP, " \--limit "=" \fInumber\fP
  136. Limit the number of packets to send.
  137. This option may appear up to 1 times.
  138. This option takes an integer number as its argument.
  139. The value of \fInumber\fP is constrained to being:
  140. .in +4
  141. .nf
  142. .na
  143. greater than or equal to 1
  144. .fi
  145. .in -4
  146. The default \fInumber\fP for this option is:
  147. .ti +4
  148. \-1
  149. .sp
  150. By default, tcpreplay will send all the packets. Alternatively, you can
  151. specify a maximum number of packets to send.
  152. .TP
  153. .BR \-m " \fIstring\fP, " \--multiplier "=" \fIstring\fP
  154. Modify replay speed to a given multiple.
  155. This option may appear up to 1 times.
  156. This option must not appear in combination with any of the following options:
  157. pps, mbps, oneatatime, topspeed.
  158. .sp
  159. Specify a floating point value to modify the packet replay speed.
  160. Examples:
  161. .nf
  162. 2.0 will replay traffic at twice the speed captured
  163. 0.7 will replay traffic at 70% the speed captured
  164. .fi
  165. .TP
  166. .BR \-p " \fInumber\fP, " \--pps "=" \fInumber\fP
  167. Replay packets at a given packets/sec.
  168. This option may appear up to 1 times.
  169. This option must not appear in combination with any of the following options:
  170. multiplier, mbps, oneatatime, topspeed.
  171. This option takes an integer number as its argument.
  172. .sp
  173. .TP
  174. .BR \-M " \fIstring\fP, " \--mbps "=" \fIstring\fP
  175. Replay packets at a given Mbps.
  176. This option may appear up to 1 times.
  177. This option must not appear in combination with any of the following options:
  178. multiplier, pps, oneatatime, topspeed.
  179. .sp
  180. Specify a floating point value for the Mbps rate that tcpreplay
  181. should send packets at.
  182. .TP
  183. .BR \-t ", " \--topspeed
  184. Replay packets as fast as possible.
  185. This option must not appear in combination with any of the following options:
  186. mbps, multiplier, pps, oneatatime.
  187. .sp
  188. .TP
  189. .BR \-o ", " \--oneatatime
  190. Replay one packet at a time for each user input.
  191. This option must not appear in combination with any of the following options:
  192. mbps, pps, multiplier, topspeed.
  193. .sp
  194. Allows you to step through one or more packets at a time.
  195. .TP
  196. .BR \-P ", " \--pid
  197. Print the PID of tcpreplay at startup.
  198. .sp
  199. .TP
  200. .BR \-V ", " \--version
  201. Print version information.
  202. .sp
  203. .TP
  204. .BR \-h ", " \--less-help
  205. Display less usage information and exit.
  206. .sp
  207. .TP
  208. .BR \-H , " \--help"
  209. Display usage information and exit.
  210. .TP
  211. .BR \-! , " \--more-help"
  212. Extended usage information passed thru pager.
  213. .TP
  214. .BR \- " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
  215. Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
  216. configuration file listed in the \fBOPTION PRESETS\fP section, below.
  217. .TP
  218. .BR \- " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
  219. Load options from \fIrcfile\fP.
  220. The \fIno-load-opts\fP form will disable the loading
  221. of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
  222. out of order.
  223. .SH OPTION PRESETS
  224. Any option that is not marked as \fInot presettable\fP may be preset
  225. by loading values from configuration ("RC" or ".INI") file(s).
  226. The \fIhomerc\fP file is "\fI$$/\fP", unless that is a directory.
  227. In that case, the file "\fI.tcpreplayrc\fP"
  228. is searched for within that directory.
  229. .SH "SIGNALS"
  230. tcpreplay understands the following signals:
  231. .sp
  232. .IR "\fBSIGUSR1\fP"
  233. Suspend tcpreplay
  234. .sp
  235. .IR "\fBSIGCONT\fP"
  236. Restart tcpreplay
  237. .br
  238. .SH "SEE ALSO"
  239. tcpdump(1), tcpprep(1), tcprewrite(1), libnet(3)
  240. .SH "BUGS"
  241. tcpreplay can only send packets as fast as your computer's interface,
  242. processor, disk and system bus will allow.
  243. Replaying captured traffic may simulate odd or broken conditions on your
  244. network and cause problems.
  245. In most cases, you can not replay traffic back to/at a server.
  246. Some operating systems by default do not allow for forging source MAC
  247. addresses. Please consult your operating system's documentation and the
  248. tcpreplay FAQ if you experiance this issue.
  249. .SH AUTHOR
  250. Copyright 2000-2007 Aaron Turner
  251. For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
  252. The latest version of this software is always available from:
  253. http://tcpreplay.synfin.net/
  254. .PP
  255. Released under the Free BSD License.
  256. .PP
  257. This manual page was \fIAutoGen\fP-erated from the \fBtcpreplay\fP
  258. option definitions.