tcpreplay.html 7.2 KB

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