tcpreplay.1 7.0 KB

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