tcpreplay-edit.1 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  1. .de1 NOP
  2. . it 1 an-trap
  3. . if \\n[.$] \,\\$*\/
  4. ..
  5. .ie t \
  6. .ds B-Font [CB]
  7. .ds I-Font [CI]
  8. .ds R-Font [CR]
  9. .el \
  10. .ds B-Font B
  11. .ds I-Font I
  12. .ds R-Font R
  13. .TH tcpreplay-edit 1 "27 Dec 2018" "tcpreplay" "User Commands"
  14. .\"
  15. .\" DO NOT EDIT THIS FILE (in-mem file)
  16. .\"
  17. .\" It has been AutoGen-ed
  18. .\" From the definitions tcpreplay_opts.def
  19. .\" and the template file agman-cmd.tpl
  20. .SH NAME
  21. \f\*[B-Font]tcpreplay-edit\fP
  22. \- Replay network traffic stored in pcap files
  23. .SH SYNOPSIS
  24. \f\*[B-Font]tcpreplay-edit\fP
  25. .\" Mixture of short (flag) options and long options
  26. [\f\*[B-Font]\-flags\f[]]
  27. [\f\*[B-Font]\-flag\f[] [\f\*[I-Font]value\f[]]]
  28. [\f\*[B-Font]\-\-option-name\f[][[=| ]\f\*[I-Font]value\f[]]]
  29. <pcap_file(s)>
  30. .sp \n(Ppu
  31. .ne 2
  32. tcpreplay is a tool for replaying network traffic from files saved with
  33. tcpdump or other tools which write pcap(3) files.
  34. .SH "DESCRIPTION"
  35. The basic operation of tcpreplay is to resend all packets from the
  36. input file(s) at the speed at which they were recorded, or a specified
  37. data rate, up to as fast as the hardware is capable.
  38. .sp
  39. Optionally, the traffic can be split between two interfaces, written to
  40. files, filtered and edited in various ways, providing the means to test
  41. firewalls, NIDS and other network devices.
  42. .sp
  43. For more details, please see the Tcpreplay Manual at:
  44. http://tcpreplay.appneta.com
  45. .SH "OPTIONS"
  46. .SS ""
  47. .TP
  48. .NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-portmap\f[]=\f\*[I-Font]string\f[]
  49. Rewrite TCP/UDP ports.
  50. This option may appear up to 9999 times.
  51. .sp
  52. Specify a list of comma delimited port mappings consisting of
  53. colon delimited port number pairs. Each colon delimited port pair
  54. consists of the port to match followed by the port number to rewrite.
  55. .sp
  56. Examples:
  57. .nf
  58. \--portmap=80:8000 \--portmap=8080:80 # 80->8000 and 8080->80
  59. \--portmap=8000,8080,88888:80 # 3 different ports become 80
  60. \--portmap=8000-8999:80 # ports 8000 to 8999 become 80
  61. .fi
  62. .TP
  63. .NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-seed\f[]=\f\*[I-Font]number\f[]
  64. Randomize src/dst IPv4/v6 addresses w/ given seed.
  65. This option may appear up to 1 times.
  66. This option must not appear in combination with any of the following options:
  67. fuzz-seed.
  68. This option takes an integer number as its argument.
  69. .sp
  70. Causes the source and destination IPv4/v6 addresses to be pseudo
  71. randomized but still maintain client/server relationships.
  72. Since the randomization is deterministic based on the seed,
  73. you can reuse the same seed value to recreate the traffic.
  74. .TP
  75. .NOP \f\*[B-Font]\-N\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-pnat\f[]=\f\*[I-Font]string\f[]
  76. Rewrite IPv4/v6 addresses using pseudo-NAT.
  77. This option may appear up to 2 times.
  78. This option must not appear in combination with any of the following options:
  79. srcipmap.
  80. .sp
  81. Takes a comma delimited series of colon delimited CIDR
  82. netblock pairs. Each netblock pair is evaluated in order against
  83. the IP addresses. If the IP address in the packet matches the
  84. first netblock, it is rewritten using the second netblock as a
  85. mask against the high order bits.
  86. .sp
  87. IPv4 Example:
  88. .nf
  89. \--pnat=192.168.0.0/16:10.77.0.0/16,172.16.0.0/12:10.1.0.0/24
  90. .fi
  91. IPv6 Example:
  92. .nf
  93. \--pnat=[2001:db8::/32]:[dead::/16],[2001:db8::/32]:[::ffff:0:0/96]
  94. .fi
  95. .TP
  96. .NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-srcipmap\f[]=\f\*[I-Font]string\f[]
  97. Rewrite source IPv4/v6 addresses using pseudo-NAT.
  98. This option may appear up to 1 times.
  99. This option must not appear in combination with any of the following options:
  100. pnat.
  101. .sp
  102. Works just like the \--pnat option, but only affects the source IP
  103. addresses in the IPv4/v6 header.
  104. .TP
  105. .NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-dstipmap\f[]=\f\*[I-Font]string\f[]
  106. Rewrite destination IPv4/v6 addresses using pseudo-NAT.
  107. This option may appear up to 1 times.
  108. This option must not appear in combination with any of the following options:
  109. pnat.
  110. .sp
  111. Works just like the \--pnat option, but only affects the destination IP
  112. addresses in the IPv4/v6 header.
  113. .TP
  114. .NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-endpoints\f[]=\f\*[I-Font]string\f[]
  115. Rewrite IP addresses to be between two endpoints.
  116. This option may appear up to 1 times.
  117. This option must appear in combination with the following options:
  118. cachefile.
  119. .sp
  120. Takes a pair of colon delimited IPv4/v6 addresses which will be used to rewrite
  121. all traffic to appear to be between the two IP addresses.
  122. .sp
  123. IPv4 Example:
  124. .nf
  125. \--endpoints=172.16.0.1:172.16.0.2
  126. .fi
  127. IPv6 Example:
  128. .nf
  129. \--endpoints=[2001:db8::dead:beef]:[::ffff:0:0:ac:f:0:2]
  130. .fi
  131. .TP
  132. .NOP \f\*[B-Font]\-\-tcp\-sequence\f[]=\f\*[I-Font]number\f[]
  133. Change TCP Sequence (and ACK) numbers /w given seed.
  134. This option takes an integer number as its argument.
  135. The value of
  136. \f\*[I-Font]number\f[]
  137. is constrained to being:
  138. .in +4
  139. .nf
  140. .na
  141. greater than or equal to 1
  142. .fi
  143. .in -4
  144. The default
  145. \f\*[I-Font]number\f[]
  146. for this option is:
  147. .ti +4
  148. 0
  149. .sp
  150. Change all TCP sequence numbers, and related sequence-acknowledgement numbers.
  151. They will be shifted by a random amount based on the provided seed.
  152. .TP
  153. .NOP \f\*[B-Font]\-b\f[], \f\*[B-Font]\-\-skipbroadcast\f[]
  154. Skip rewriting broadcast/multicast IPv4/v6 addresses.
  155. .sp
  156. By default \--seed, \--pnat and \--endpoints will rewrite
  157. broadcast and multicast IPv4/v6 and MAC addresses. Setting this flag
  158. will keep broadcast/multicast IPv4/v6 and MAC addresses from being rewritten.
  159. .TP
  160. .NOP \f\*[B-Font]\-C\f[], \f\*[B-Font]\-\-fixcsum\f[]
  161. Force recalculation of IPv4/TCP/UDP header checksums.
  162. .sp
  163. Causes each IPv4/v6 packet to have their checksums recalculated and
  164. fixed. Automatically enabled for packets modified with \fB--seed\fP,
  165. \fB--pnat\fP, \fB--endpoints\fP or \fB--fixlen\fP.
  166. .TP
  167. .NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-mtu\f[]=\f\*[I-Font]number\f[]
  168. Override default MTU length (1500 bytes).
  169. This option may appear up to 1 times.
  170. This option takes an integer number as its argument.
  171. The value of
  172. \f\*[I-Font]number\f[]
  173. is constrained to being:
  174. .in +4
  175. .nf
  176. .na
  177. in the range 1 through MAXPACKET
  178. .fi
  179. .in -4
  180. .sp
  181. Override the default 1500 byte MTU size for determining the maximum padding length
  182. (--fixlen=pad) or when truncating (--mtu-trunc).
  183. .TP
  184. .NOP \f\*[B-Font]\-\-mtu\-trunc\f[]
  185. Truncate packets larger then specified MTU.
  186. This option may appear up to 1 times.
  187. .sp
  188. Similar to \--fixlen, this option will truncate data in packets from Layer 3 and above to be
  189. no larger then the MTU.
  190. .TP
  191. .NOP \f\*[B-Font]\-E\f[], \f\*[B-Font]\-\-efcs\f[]
  192. Remove Ethernet checksums (FCS) from end of frames.
  193. .sp
  194. Note, this option is pretty dangerous! We do not actually check to see if a FCS
  195. actually exists in the frame, we just blindly delete the last 4 bytes. Hence,
  196. you should only use this if you know know that your OS provides the FCS when
  197. reading raw packets.
  198. .TP
  199. .NOP \f\*[B-Font]\-\-ttl\f[]=\f\*[I-Font]string\f[]
  200. Modify the IPv4/v6 TTL/Hop Limit.
  201. .sp
  202. Allows you to modify the TTL/Hop Limit of all the IPv4/v6 packets. Specify a number to hard-code
  203. the value or +/-value to increase or decrease by the value provided (limited to 1-255).
  204. .sp
  205. Examples:
  206. .nf
  207. \--ttl=10
  208. \--ttl=+7
  209. \--ttl=-64
  210. .fi
  211. .TP
  212. .NOP \f\*[B-Font]\-\-tos\f[]=\f\*[I-Font]number\f[]
  213. Set the IPv4 TOS/DiffServ/ECN byte.
  214. This option may appear up to 1 times.
  215. This option takes an integer number as its argument.
  216. The value of
  217. \f\*[I-Font]number\f[]
  218. is constrained to being:
  219. .in +4
  220. .nf
  221. .na
  222. in the range 0 through 255
  223. .fi
  224. .in -4
  225. .sp
  226. Allows you to override the TOS (also known as DiffServ/ECN) value in IPv4.
  227. .TP
  228. .NOP \f\*[B-Font]\-\-tclass\f[]=\f\*[I-Font]number\f[]
  229. Set the IPv6 Traffic Class byte.
  230. This option may appear up to 1 times.
  231. This option takes an integer number as its argument.
  232. The value of
  233. \f\*[I-Font]number\f[]
  234. is constrained to being:
  235. .in +4
  236. .nf
  237. .na
  238. in the range 0 through 255
  239. .fi
  240. .in -4
  241. .sp
  242. Allows you to override the IPv6 Traffic Class field.
  243. .TP
  244. .NOP \f\*[B-Font]\-\-flowlabel\f[]=\f\*[I-Font]number\f[]
  245. Set the IPv6 Flow Label.
  246. This option may appear up to 1 times.
  247. This option takes an integer number as its argument.
  248. The value of
  249. \f\*[I-Font]number\f[]
  250. is constrained to being:
  251. .in +4
  252. .nf
  253. .na
  254. in the range 0 through 1048575
  255. .fi
  256. .in -4
  257. .sp
  258. Allows you to override the 20bit IPv6 Flow Label field. Has no effect on IPv4
  259. packets.
  260. .TP
  261. .NOP \f\*[B-Font]\-F\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-fixlen\f[]=\f\*[I-Font]string\f[]
  262. Pad or truncate packet data to match header length.
  263. This option may appear up to 1 times.
  264. .sp
  265. Packets may be truncated during capture if the snaplen is smaller then the
  266. packet. This option allows you to modify the packet to pad the packet back
  267. out to the size stored in the IPv4/v6 header or rewrite the IP header total length
  268. to reflect the stored packet length.
  269. .sp 1
  270. \fBpad\fP
  271. Truncated packets will be padded out so that the packet length matches the
  272. IPv4 total length
  273. .sp 1
  274. \fBtrunc\fP
  275. Truncated packets will have their IPv4 total length field rewritten to match
  276. the actual packet length
  277. .sp 1
  278. \fBdel\fP
  279. Delete the packet
  280. .TP
  281. .NOP \f\*[B-Font]\-\-fuzz\-seed\f[]=\f\*[I-Font]number\f[]
  282. Fuzz 1 in X packets. Edit bytes, length, or emulate packet drop.
  283. This option takes an integer number as its argument.
  284. The value of
  285. \f\*[I-Font]number\f[]
  286. is constrained to being:
  287. .in +4
  288. .nf
  289. .na
  290. greater than or equal to 0
  291. .fi
  292. .in -4
  293. The default
  294. \f\*[I-Font]number\f[]
  295. for this option is:
  296. .ti +4
  297. 0
  298. .sp
  299. This fuzzing was designed as to test layer 7 protocols such as voip protocols.
  300. It modifies randomly 1 out of X packets (where X = \fB--fuzz-factor\fP) in order
  301. for stateful protocols to cover more of their code. The random fuzzing actions
  302. focus on data start and end because it often is the part of the data application
  303. protocols base their decisions on.
  304. .sp
  305. Possible fuzzing actions list:
  306. * drop packet
  307. * reduce packet size
  308. * edit packet Bytes:
  309. * Not all Bytes have the same probability of appearance in real life.
  310. Replace with 0x00, 0xFF, or a random byte with equal likelihood.
  311. * Not all Bytes have the same significance in a packet.
  312. Replace the start, the end, or the middle of the packet with equal likelihood.
  313. * do nothing (7 out of 8 packets)
  314. .TP
  315. .NOP \f\*[B-Font]\-\-fuzz\-factor\f[]=\f\*[I-Font]number\f[]
  316. Set the Fuzz 1 in X packet ratio (default 1 in 8 packets).
  317. This option must appear in combination with the following options:
  318. fuzz-seed.
  319. This option takes an integer number as its argument.
  320. The value of
  321. \f\*[I-Font]number\f[]
  322. is constrained to being:
  323. .in +4
  324. .nf
  325. .na
  326. greater than or equal to 1
  327. .fi
  328. .in -4
  329. The default
  330. \f\*[I-Font]number\f[]
  331. for this option is:
  332. .ti +4
  333. 8
  334. .sp
  335. Sets the ratio of for \fB--fuzz-seed\fP option. By default this value is 8,
  336. which means 1 in 8 packets are modified by fuzzing. Note that this ratio is
  337. based on the random number generated by the supplied fuzz seed. Therefore by
  338. default you cannot expect that exactly every eighth packet will be modified.
  339. .TP
  340. .NOP \f\*[B-Font]\-\-skipl2broadcast\f[]
  341. Skip rewriting broadcast/multicast Layer 2 addresses.
  342. .sp
  343. By default, editing Layer 2 addresses will rewrite
  344. broadcast and multicast MAC addresses. Setting this flag
  345. will keep broadcast/multicast MAC addresses from being rewritten.
  346. .TP
  347. .NOP \f\*[B-Font]\-\-dlt\f[]=\f\*[I-Font]string\f[]
  348. Override output DLT encapsulation.
  349. This option may appear up to 1 times.
  350. .sp
  351. By default, no DLT (data link type) conversion will be made.
  352. To change the DLT type of the output pcap, select one of the following values:
  353. .sp 1
  354. \fBenet\fP
  355. Ethernet aka DLT_EN10MB
  356. .sp 1
  357. \fBhdlc\fP
  358. Cisco HDLC aka DLT_C_HDLC
  359. .sp 1
  360. \fBjnpr_ether\fP
  361. Juniper Ethernet DLT_C_JNPR_ETHER
  362. .sp 1
  363. \fBpppserial\fP
  364. PPP Serial aka DLT_PPP_SERIAL
  365. .sp 1
  366. \fBuser\fP
  367. User specified Layer 2 header and DLT type
  368. .br
  369. .TP
  370. .NOP \f\*[B-Font]\-\-enet\-dmac\f[]=\f\*[I-Font]string\f[]
  371. Override destination ethernet MAC addresses.
  372. This option may appear up to 1 times.
  373. .sp
  374. Takes a pair of comma deliminated ethernet MAC addresses which
  375. will replace the destination MAC address of outbound packets.
  376. The first MAC address will be used for the server to client traffic
  377. and the optional second MAC address will be used for the client
  378. to server traffic.
  379. .sp
  380. Example:
  381. .nf
  382. \--enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66
  383. .fi
  384. .TP
  385. .NOP \f\*[B-Font]\-\-enet\-smac\f[]=\f\*[I-Font]string\f[]
  386. Override source ethernet MAC addresses.
  387. This option may appear up to 1 times.
  388. .sp
  389. Takes a pair of comma deliminated ethernet MAC addresses which
  390. will replace the source MAC address of outbound packets.
  391. The first MAC address will be used for the server to client traffic
  392. and the optional second MAC address will be used for the client
  393. to server traffic.
  394. .sp
  395. Example:
  396. .nf
  397. \--enet-smac=00:12:13:14:15:16,00:22:33:44:55:66
  398. .fi
  399. .TP
  400. .NOP \f\*[B-Font]\-\-enet\-subsmac\f[]=\f\*[I-Font]string\f[]
  401. Substitute MAC addresses.
  402. This option may appear up to 9999 times.
  403. .sp
  404. Allows you to rewrite ethernet MAC addresses of packets. It takes
  405. comma delimited pair or MACs address and rewrites all occurrences of
  406. the first MAC with the value of the second MAC.
  407. Example:
  408. .nf
  409. \--enet-subsmac=00:12:13:14:15:16,00:22:33:44:55:66
  410. .fi
  411. .TP
  412. .NOP \f\*[B-Font]\-\-enet\-mac\-seed\f[]=\f\*[I-Font]number\f[]
  413. Randomize MAC addresses.
  414. This option may appear up to 1 times.
  415. This option must not appear in combination with any of the following options:
  416. enet-smac, enet-dmac, enet-subsmac.
  417. This option takes an integer number as its argument.
  418. .sp
  419. Allows you to randomize ethernet MAC addresses of packets, mostly
  420. like what \fB--seed\fP option does for IPv4/IPv6 addresses.
  421. .TP
  422. .NOP \f\*[B-Font]\-\-enet\-mac\-seed\-keep\-bytes\f[]=\f\*[I-Font]number\f[]
  423. Randomize MAC addresses.
  424. This option may appear up to 1 times.
  425. This option must appear in combination with the following options:
  426. enet-mac-seed.
  427. This option takes an integer number as its argument.
  428. The value of
  429. \f\*[I-Font]number\f[]
  430. is constrained to being:
  431. .in +4
  432. .nf
  433. .na
  434. in the range 1 through 6
  435. .fi
  436. .in -4
  437. .sp
  438. Keep some bytes untouched when usinging \fB--enet-mac-seed\fP option.
  439. .TP
  440. .NOP \f\*[B-Font]\-\-enet\-vlan\f[]=\f\*[I-Font]string\f[]
  441. Specify ethernet 802.1q VLAN tag mode.
  442. This option may appear up to 1 times.
  443. .sp
  444. Allows you to rewrite ethernet frames to add a 802.1q header to standard 802.3
  445. ethernet headers or remove the 802.1q VLAN tag information.
  446. .sp 1
  447. \fBadd\fP
  448. Rewrites the existing 802.3 ethernet header as an 802.1q VLAN header
  449. .sp 1
  450. \fBdel\fP
  451. Rewrites the existing 802.1q VLAN header as an 802.3 ethernet header
  452. .TP
  453. .NOP \f\*[B-Font]\-\-enet\-vlan\-tag\f[]=\f\*[I-Font]number\f[]
  454. Specify the new ethernet 802.1q VLAN tag value.
  455. This option may appear up to 1 times.
  456. This option must appear in combination with the following options:
  457. enet-vlan.
  458. This option takes an integer number as its argument.
  459. The value of
  460. \f\*[I-Font]number\f[]
  461. is constrained to being:
  462. .in +4
  463. .nf
  464. .na
  465. in the range 0 through 4095
  466. .fi
  467. .in -4
  468. .sp
  469. .TP
  470. .NOP \f\*[B-Font]\-\-enet\-vlan\-cfi\f[]=\f\*[I-Font]number\f[]
  471. Specify the ethernet 802.1q VLAN CFI value.
  472. This option may appear up to 1 times.
  473. This option must appear in combination with the following options:
  474. enet-vlan.
  475. This option takes an integer number as its argument.
  476. The value of
  477. \f\*[I-Font]number\f[]
  478. is constrained to being:
  479. .in +4
  480. .nf
  481. .na
  482. in the range 0 through 1
  483. .fi
  484. .in -4
  485. .sp
  486. .TP
  487. .NOP \f\*[B-Font]\-\-enet\-vlan\-pri\f[]=\f\*[I-Font]number\f[]
  488. Specify the ethernet 802.1q VLAN priority.
  489. This option may appear up to 1 times.
  490. This option must appear in combination with the following options:
  491. enet-vlan.
  492. This option takes an integer number as its argument.
  493. The value of
  494. \f\*[I-Font]number\f[]
  495. is constrained to being:
  496. .in +4
  497. .nf
  498. .na
  499. in the range 0 through 7
  500. .fi
  501. .in -4
  502. .sp
  503. .TP
  504. .NOP \f\*[B-Font]\-\-hdlc\-control\f[]=\f\*[I-Font]number\f[]
  505. Specify HDLC control value.
  506. This option may appear up to 1 times.
  507. This option takes an integer number as its argument.
  508. .sp
  509. The Cisco HDLC header has a 1 byte "control" field. Apparently this should
  510. always be 0, but if you can use any 1 byte value.
  511. .TP
  512. .NOP \f\*[B-Font]\-\-hdlc\-address\f[]=\f\*[I-Font]number\f[]
  513. Specify HDLC address.
  514. This option may appear up to 1 times.
  515. This option takes an integer number as its argument.
  516. .sp
  517. The Cisco HDLC header has a 1 byte "address" field which has two valid
  518. values:
  519. .sp 1
  520. \fB0x0F\fP
  521. Unicast
  522. .sp 1
  523. \fB0xBF\fP
  524. Broadcast
  525. .br
  526. You can however specify any single byte value.
  527. .TP
  528. .NOP \f\*[B-Font]\-\-user\-dlt\f[]=\f\*[I-Font]number\f[]
  529. Set output file DLT type.
  530. This option may appear up to 1 times.
  531. This option takes an integer number as its argument.
  532. .sp
  533. Set the DLT value of the output pcap file.
  534. .TP
  535. .NOP \f\*[B-Font]\-\-user\-dlink\f[]=\f\*[I-Font]string\f[]
  536. Rewrite Data-Link layer with user specified data.
  537. This option may appear up to 2 times.
  538. .sp
  539. Provide a series of comma deliminated hex values which will be
  540. used to rewrite or create the Layer 2 header of the packets.
  541. The first instance of this argument will rewrite both server
  542. and client traffic, but if this argument is specified a second
  543. time, it will be used for the client traffic.
  544. .sp
  545. Example:
  546. .nf
  547. \--user-dlink=01,02,03,04,05,06,00,1A,2B,3C,4D,5E,6F,08,00
  548. .fi
  549. .TP
  550. .NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-dbug\f[]=\f\*[I-Font]number\f[]
  551. Enable debugging output.
  552. This option may appear up to 1 times.
  553. This option takes an integer number as its argument.
  554. The value of
  555. \f\*[I-Font]number\f[]
  556. is constrained to being:
  557. .in +4
  558. .nf
  559. .na
  560. in the range 0 through 5
  561. .fi
  562. .in -4
  563. The default
  564. \f\*[I-Font]number\f[]
  565. for this option is:
  566. .ti +4
  567. 0
  568. .sp
  569. If configured with \--enable-debug, then you can specify a verbosity
  570. level for debugging output. Higher numbers increase verbosity.
  571. .TP
  572. .NOP \f\*[B-Font]\-q\f[], \f\*[B-Font]\-\-quiet\f[]
  573. Quiet mode.
  574. .sp
  575. Print nothing except the statistics at the end of the run
  576. .TP
  577. .NOP \f\*[B-Font]\-T\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-timer\f[]=\f\*[I-Font]string\f[]
  578. Select packet timing mode: select, ioport, gtod, nano.
  579. This option may appear up to 1 times.
  580. The default
  581. \f\*[I-Font]string\f[]
  582. for this option is:
  583. .ti +4
  584. gtod
  585. .sp
  586. Allows you to select the packet timing method to use:
  587. .sp
  588. .IR "nano"
  589. - Use nanosleep() API
  590. .sp
  591. .IR "select"
  592. - Use select() API
  593. .sp
  594. .IR "ioport"
  595. - Write to the i386 IO Port 0x80
  596. .sp
  597. .IR "gtod [default]"
  598. - Use a gettimeofday() loop
  599. .br
  600. .TP
  601. .NOP \f\*[B-Font]\-\-maxsleep\f[]=\f\*[I-Font]number\f[]
  602. Sleep for no more then X milliseconds between packets.
  603. This option takes an integer number as its argument.
  604. The default
  605. \f\*[I-Font]number\f[]
  606. for this option is:
  607. .ti +4
  608. 0
  609. .sp
  610. Set a limit for the maximum number of milliseconds that tcpreplay will sleep
  611. between packets. Effectively prevents long delays between packets without
  612. effecting the majority of packets. Default is disabled.
  613. .TP
  614. .NOP \f\*[B-Font]\-v\f[], \f\*[B-Font]\-\-verbose\f[]
  615. Print decoded packets via tcpdump to STDOUT.
  616. This option may appear up to 1 times.
  617. .sp
  618. .TP
  619. .NOP \f\*[B-Font]\-A\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-decode\f[]=\f\*[I-Font]string\f[]
  620. Arguments passed to tcpdump decoder.
  621. This option may appear up to 1 times.
  622. This option must appear in combination with the following options:
  623. verbose.
  624. .sp
  625. When enabling verbose mode (\fB-v\fP) you may also specify one or more
  626. additional arguments to pass to \fBtcpdump\fP to modify the way packets
  627. are decoded. By default, \-n and \-l are used. Be sure to
  628. quote the arguments like: \-A "-axxx" so that they are not interpreted
  629. by tcpreplay. Please see the tcpdump(1) man page for a complete list of
  630. options.
  631. .TP
  632. .NOP \f\*[B-Font]\-K\f[], \f\*[B-Font]\-\-preload\-pcap\f[]
  633. Preloads packets into RAM before sending.
  634. .sp
  635. This option loads the specified pcap(s) into RAM before starting to send in order
  636. to improve replay performance while introducing a startup performance hit.
  637. Preloading can be used with or without \fB--loop\fP. This option also suppresses
  638. flow statistics collection for every iteration, which can significantly reduce
  639. memory usage. Flow statistics are predicted based on options supplied and
  640. statistics collected from the first loop iteration.
  641. .TP
  642. .NOP \f\*[B-Font]\-c\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-cachefile\f[]=\f\*[I-Font]string\f[]
  643. Split traffic via a tcpprep cache file.
  644. This option may appear up to 1 times.
  645. This option must appear in combination with the following options:
  646. intf2.
  647. This option must not appear in combination with any of the following options:
  648. dualfile.
  649. .sp
  650. If you have a pcap file you would like to use to send bi-directional
  651. traffic through a device (firewall, router, IDS, etc) then using tcpprep
  652. you can create a cachefile which tcpreplay will use to split the traffic
  653. across two network interfaces.
  654. .TP
  655. .NOP \f\*[B-Font]\-2\f[], \f\*[B-Font]\-\-dualfile\f[]
  656. Replay two files at a time from a network tap.
  657. This option may appear up to 1 times.
  658. This option must appear in combination with the following options:
  659. intf2.
  660. This option must not appear in combination with any of the following options:
  661. cachefile.
  662. .sp
  663. If you captured network traffic using a network tap, then you can end up with
  664. two pcap files- one for each direction. This option will replay these two
  665. files at the same time, one on each interface and inter-mix them using the
  666. timestamps in each.
  667. .TP
  668. .NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-intf1\f[]=\f\*[I-Font]string\f[]
  669. Client to server/RX/primary traffic output interface.
  670. This option may appear up to 1 times.
  671. .sp
  672. Required network interface used to send either all traffic or traffic which is
  673. marked as 'primary' via tcpprep. Primary traffic is usually client-to-server
  674. or inbound (RX) on khial virtual interfaces.
  675. .TP
  676. .NOP \f\*[B-Font]\-I\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-intf2\f[]=\f\*[I-Font]string\f[]
  677. Server to client/TX/secondary traffic output interface.
  678. This option may appear up to 1 times.
  679. .sp
  680. Optional network interface used to send traffic which is marked as 'secondary'
  681. via tcpprep. Secondary traffic is usually server-to-client or outbound
  682. (TX) on khial virtual interfaces. Generally, it only makes sense to use this
  683. option with \--cachefile.
  684. .TP
  685. .NOP \f\*[B-Font]\-\-listnics\f[]
  686. List available network interfaces and exit.
  687. .sp
  688. .TP
  689. .NOP \f\*[B-Font]\-l\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-loop\f[]=\f\*[I-Font]number\f[]
  690. Loop through the capture file X times.
  691. This option may appear up to 1 times.
  692. This option takes an integer number as its argument.
  693. The value of
  694. \f\*[I-Font]number\f[]
  695. is constrained to being:
  696. .in +4
  697. .nf
  698. .na
  699. greater than or equal to 0
  700. .fi
  701. .in -4
  702. The default
  703. \f\*[I-Font]number\f[]
  704. for this option is:
  705. .ti +4
  706. 1
  707. .sp
  708. .TP
  709. .NOP \f\*[B-Font]\-\-loopdelay\-ms\f[]=\f\*[I-Font]number\f[]
  710. Delay between loops in milliseconds.
  711. This option must appear in combination with the following options:
  712. loop.
  713. This option takes an integer number as its argument.
  714. The value of
  715. \f\*[I-Font]number\f[]
  716. is constrained to being:
  717. .in +4
  718. .nf
  719. .na
  720. greater than or equal to 0
  721. .fi
  722. .in -4
  723. The default
  724. \f\*[I-Font]number\f[]
  725. for this option is:
  726. .ti +4
  727. 0
  728. .sp
  729. .TP
  730. .NOP \f\*[B-Font]\-\-pktlen\f[]
  731. Override the snaplen and use the actual packet len.
  732. This option may appear up to 1 times.
  733. .sp
  734. By default, tcpreplay will send packets based on the size of the "snaplen"
  735. stored in the pcap file which is usually the correct thing to do. However,
  736. occasionally, tools will store more bytes then told to. By specifying this
  737. option, tcpreplay will ignore the snaplen field and instead try to send
  738. packets based on the original packet length. Bad things may happen if
  739. you specify this option.
  740. .TP
  741. .NOP \f\*[B-Font]\-L\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-limit\f[]=\f\*[I-Font]number\f[]
  742. Limit the number of packets to send.
  743. This option may appear up to 1 times.
  744. This option takes an integer number as its argument.
  745. The value of
  746. \f\*[I-Font]number\f[]
  747. is constrained to being:
  748. .in +4
  749. .nf
  750. .na
  751. greater than or equal to 1
  752. .fi
  753. .in -4
  754. The default
  755. \f\*[I-Font]number\f[]
  756. for this option is:
  757. .ti +4
  758. \-1
  759. .sp
  760. By default, tcpreplay will send all the packets. Alternatively, you can
  761. specify a maximum number of packets to send.
  762. .TP
  763. .NOP \f\*[B-Font]\-\-duration\f[]=\f\*[I-Font]number\f[]
  764. Limit the number of seconds to send.
  765. This option may appear up to 1 times.
  766. This option takes an integer number as its argument.
  767. The value of
  768. \f\*[I-Font]number\f[]
  769. is constrained to being:
  770. .in +4
  771. .nf
  772. .na
  773. greater than or equal to 1
  774. .fi
  775. .in -4
  776. The default
  777. \f\*[I-Font]number\f[]
  778. for this option is:
  779. .ti +4
  780. \-1
  781. .sp
  782. By default, tcpreplay will send all the packets. Alternatively, you can
  783. specify a maximum number of seconds to transmit.
  784. .TP
  785. .NOP \f\*[B-Font]\-x\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-multiplier\f[]=\f\*[I-Font]string\f[]
  786. Modify replay speed to a given multiple.
  787. This option may appear up to 1 times.
  788. This option must not appear in combination with any of the following options:
  789. pps, mbps, oneatatime, topspeed.
  790. .sp
  791. Specify a value to modify the packet replay speed.
  792. Examples:
  793. .nf
  794. 2.0 will replay traffic at twice the speed captured
  795. 0.7 will replay traffic at 70% the speed captured
  796. .fi
  797. .TP
  798. .NOP \f\*[B-Font]\-p\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-pps\f[]=\f\*[I-Font]string\f[]
  799. Replay packets at a given packets/sec.
  800. This option may appear up to 1 times.
  801. This option must not appear in combination with any of the following options:
  802. multiplier, mbps, oneatatime, topspeed.
  803. .sp
  804. Specify a value to regulate the packet replay to a specific packet-per-second rate.
  805. Examples:
  806. .nf
  807. 200 will replay traffic at 200 packets per second
  808. 0.25 will replay traffic at 15 packets per minute
  809. .fi
  810. .TP
  811. .NOP \f\*[B-Font]\-M\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-mbps\f[]=\f\*[I-Font]string\f[]
  812. Replay packets at a given Mbps.
  813. This option may appear up to 1 times.
  814. This option must not appear in combination with any of the following options:
  815. multiplier, pps, oneatatime, topspeed.
  816. .sp
  817. Specify a floating point value for the Mbps rate that tcpreplay
  818. should send packets at.
  819. .TP
  820. .NOP \f\*[B-Font]\-t\f[], \f\*[B-Font]\-\-topspeed\f[]
  821. Replay packets as fast as possible.
  822. This option must not appear in combination with any of the following options:
  823. mbps, multiplier, pps, oneatatime.
  824. .sp
  825. .TP
  826. .NOP \f\*[B-Font]\-o\f[], \f\*[B-Font]\-\-oneatatime\f[]
  827. Replay one packet at a time for each user input.
  828. This option must not appear in combination with any of the following options:
  829. mbps, pps, multiplier, topspeed.
  830. .sp
  831. Allows you to step through one or more packets at a time.
  832. .TP
  833. .NOP \f\*[B-Font]\-\-pps\-multi\f[]=\f\*[I-Font]number\f[]
  834. Number of packets to send for each time interval.
  835. This option must appear in combination with the following options:
  836. pps.
  837. This option takes an integer number as its argument.
  838. The value of
  839. \f\*[I-Font]number\f[]
  840. is constrained to being:
  841. .in +4
  842. .nf
  843. .na
  844. greater than or equal to 1
  845. .fi
  846. .in -4
  847. The default
  848. \f\*[I-Font]number\f[]
  849. for this option is:
  850. .ti +4
  851. 1
  852. .sp
  853. When trying to send packets at very high rates, the time between each packet
  854. can be so short that it is impossible to accurately sleep for the required
  855. period of time. This option allows you to send multiple packets at a time,
  856. thus allowing for longer sleep times which can be more accurately implemented.
  857. .TP
  858. .NOP \f\*[B-Font]\-\-unique\-ip\f[]
  859. Modify IP addresses each loop iteration to generate unique flows.
  860. This option must appear in combination with the following options:
  861. loop.
  862. This option must not appear in combination with any of the following options:
  863. seed, fuzz-seed.
  864. .sp
  865. Ensure IPv4 and IPv6 packets will be unique for each \fB--loop\fP iteration.
  866. This is done in a way that will not alter packet CRC, and therefore will genrally
  867. not affect performance. This option will significantly increase the flows/sec over
  868. generated over multiple loop iterations.
  869. .TP
  870. .NOP \f\*[B-Font]\-\-unique\-ip\-loops\f[]=\f\*[I-Font]string\f[]
  871. Number of times to loop before assigning new unique ip.
  872. This option may appear up to 1 times.
  873. This option must appear in combination with the following options:
  874. unique-ip.
  875. .sp
  876. Number of \fB--loop\fP iterations before a new unique IP is assigned. Default
  877. is 1. Assumes both \fB--loop\fP and \fB--unique-ip\fP.
  878. .TP
  879. .NOP \f\*[B-Font]\-\-netmap\f[]
  880. Write packets directly to netmap enabled network adapter.
  881. .sp
  882. This feature will detect netmap capable network drivers on Linux and BSD
  883. systems. If detected, the network driver is bypassed for the execution
  884. duration, and network buffers will be written to directly. This will allow
  885. you to achieve full line rates on commodity network adapters, similar to rates
  886. achieved by commercial network traffic generators. Note that bypassing the network
  887. driver will disrupt other applications connected through the test interface. See
  888. INSTALL for more information.
  889. .sp
  890. This feature can also be enabled by specifying an interface as 'netmap:<intf>'
  891. or 'vale:<intf>. For example 'netmap:eth0' specifies netmap over interface eth0.
  892. .TP
  893. .NOP \f\*[B-Font]\-\-nm\-delay\f[]=\f\*[I-Font]number\f[]
  894. Netmap startup delay.
  895. This option takes an integer number as its argument.
  896. The default
  897. \f\*[I-Font]number\f[]
  898. for this option is:
  899. .ti +4
  900. 10
  901. .sp
  902. Number of seconds to delay after netmap is loaded. Required to ensure interfaces
  903. are fully up before netmap transmit. Requires netmap option. Default is 10 seconds.
  904. .TP
  905. .NOP \f\*[B-Font]\-\-no\-flow\-stats\f[]
  906. Suppress printing and tracking flow count, rates and expirations.
  907. .sp
  908. Suppress the collection and printing of flow statistics. This option may
  909. improve performance when not using \fB--preload-pcap\fP option, otherwise
  910. its only function is to suppress printing.
  911. .sp
  912. The flow feature will track and print statistics of the flows being sent.
  913. A flow is loosely defined as a unique combination of a 5-tuple, i.e.
  914. source IP, destination IP, source port, destination port and protocol.
  915. .sp
  916. If \fB--loop\fP is specified, the flows from one iteration to the next
  917. will not be unique, unless the packets are altered. Use \fB--unique-ip\fP
  918. or \fBtcpreplay-edit\fP to alter packets between iterations.
  919. .TP
  920. .NOP \f\*[B-Font]\-\-flow\-expiry\f[]=\f\*[I-Font]number\f[]
  921. Number of inactive seconds before a flow is considered expired.
  922. This option must not appear in combination with any of the following options:
  923. no-flow-stats.
  924. This option takes an integer number as its argument.
  925. The value of
  926. \f\*[I-Font]number\f[]
  927. is constrained to being:
  928. .in +4
  929. .nf
  930. .na
  931. greater than or equal to 0
  932. .fi
  933. .in -4
  934. The default
  935. \f\*[I-Font]number\f[]
  936. for this option is:
  937. .ti +4
  938. 0
  939. .sp
  940. This option will track and report flow expirations based on the flow idle
  941. times. The timestamps within the pcap file are used to determine the expiry,
  942. not the actual timestamp of the packets are replayed. For example, a value of
  943. 30 suggests that if no traffic is seen on a flow for 30 seconds, any
  944. subsequent traffic would be considered a new flow, and thereby will increment
  945. the flows and flows per second (fps) statistics.
  946. .sp
  947. This option can be used to optimize flow timeout settings for flow products.
  948. Setting the timeout low may lead to flows being dropped when in fact the flow
  949. is simply slow to respond. Configuring your flow timeouts too high may
  950. increase resources required by your flow product.
  951. .sp
  952. Note that using this option while replaying at higher than original speeds
  953. can lead to inflated flows and fps counts.
  954. .sp
  955. Default is 0 (no expiry) and a typical value is 30-120 seconds.
  956. .TP
  957. .NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pid\f[]
  958. Print the PID of tcpreplay at startup.
  959. .sp
  960. .TP
  961. .NOP \f\*[B-Font]\-\-stats\f[]=\f\*[I-Font]number\f[]
  962. Print statistics every X seconds, or every loop if '0'.
  963. This option takes an integer number as its argument.
  964. The value of
  965. \f\*[I-Font]number\f[]
  966. is constrained to being:
  967. .in +4
  968. .nf
  969. .na
  970. greater than or equal to 0
  971. .fi
  972. .in -4
  973. .sp
  974. Note that timed delays are a "best effort" and long delays between
  975. sending packets may cause equally long delays between printing statistics.
  976. .TP
  977. .NOP \f\*[B-Font]\-V\f[], \f\*[B-Font]\-\-version\f[]
  978. Print version information.
  979. .sp
  980. .TP
  981. .NOP \f\*[B-Font]\-h\f[], \f\*[B-Font]\-\-less\-help\f[]
  982. Display less usage information and exit.
  983. .sp
  984. .TP
  985. .NOP \f\*[B-Font]\-H\f[], \f\*[B-Font]\-\-help\f[]
  986. Display usage information and exit.
  987. .TP
  988. .NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
  989. Pass the extended usage information through a pager.
  990. .TP
  991. .NOP \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
  992. Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
  993. configuration file listed in the \fBOPTION PRESETS\fP section, below.
  994. The command will exit after updating the config file.
  995. .TP
  996. .NOP \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
  997. Load options from \fIcfgfile\fP.
  998. The \fIno-load-opts\fP form will disable the loading
  999. of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
  1000. out of order.
  1001. .PP
  1002. .SH "OPTION PRESETS"
  1003. Any option that is not marked as \fInot presettable\fP may be preset
  1004. by loading values from configuration ("RC" or ".INI") file(s).
  1005. The \fIhomerc\fP file is "\fI$$/\fP", unless that is a directory.
  1006. In that case, the file "\fI.tcpreplay-editrc\fP"
  1007. is searched for within that directory.
  1008. .SH "FILES"
  1009. See \fBOPTION PRESETS\fP for configuration files.
  1010. .SH "EXIT STATUS"
  1011. One of the following exit values will be returned:
  1012. .TP
  1013. .NOP 0 " (EXIT_SUCCESS)"
  1014. Successful program execution.
  1015. .TP
  1016. .NOP 1 " (EXIT_FAILURE)"
  1017. The operation failed or the command syntax was not valid.
  1018. .TP
  1019. .NOP 66 " (EX_NOINPUT)"
  1020. A specified configuration file could not be loaded.
  1021. .TP
  1022. .NOP 70 " (EX_SOFTWARE)"
  1023. libopts had an internal operational error. Please report
  1024. it to autogen-users@lists.sourceforge.net. Thank you.
  1025. .PP
  1026. .SH "AUTHORS"
  1027. Copyright 2013-2018 Fred Klassen \- AppNeta
  1028. Copyright 2000-2012 Aaron Turner
  1029. For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
  1030. The latest version of this software is always available from:
  1031. http://tcpreplay.appneta.com/
  1032. .SH "COPYRIGHT"
  1033. Copyright (C) 2000-2018 Aaron Turner and Fred Klassen all rights reserved.
  1034. This program is released under the terms of the GNU General Public License, version 3 or later.
  1035. .SH "BUGS"
  1036. Please send bug reports to: tcpreplay-users@lists.sourceforge.net
  1037. .SH "NOTES"
  1038. This manual page was \fIAutoGen\fP-erated from the \fBtcpreplay-edit\fP
  1039. option definitions.