tcpreplay.html 7.6 KB

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