tcpbridge.1 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  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 tcpbridge 1 "12 Jul 2024" "tcpbridge" "User Commands"
  14. .\"
  15. .\" DO NOT EDIT THIS FILE (in-mem file)
  16. .\"
  17. .\" It has been AutoGen-ed
  18. .\" From the definitions ../../src/tcpbridge_opts.def
  19. .\" and the template file agman-cmd.tpl
  20. .SH NAME
  21. \f\*[B-Font]tcpbridge\fP
  22. \- Bridge network traffic across two interfaces
  23. .SH SYNOPSIS
  24. \f\*[B-Font]tcpbridge\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. .sp \n(Ppu
  30. .ne 2
  31. All arguments must be options.
  32. .sp \n(Ppu
  33. .ne 2
  34. tcpbridge is a tool for selectively bridging network traffic across two interfaces
  35. and optionally modifying the packets in between
  36. .SH "DESCRIPTION"
  37. The basic operation of tcpbridge is to be a network bridge between two
  38. subnets. All packets received on one interface are sent via the other.
  39. .sp
  40. Optionally, packets can be edited in a variety of ways according to your needs.
  41. .sp
  42. For more details, please see the Tcpreplay Manual at:
  43. http://tcpreplay.appneta.com
  44. .SH "OPTIONS"
  45. .SS ""
  46. .TP
  47. .NOP \f\*[B-Font]\-r\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-portmap\f[]=\f\*[I-Font]string\f[]
  48. Rewrite TCP/UDP ports.
  49. This option may appear up to 9999 times.
  50. .sp
  51. Specify a list of comma delimited port mappings consisting of
  52. colon delimited port number pairs. Each colon delimited port pair
  53. consists of the port to match followed by the port number to rewrite.
  54. .sp
  55. Examples:
  56. .nf
  57. \--portmap=80:8000 \--portmap=8080:80 # 80->8000 and 8080->80
  58. \--portmap=8000,8080,88888:80 # 3 different ports become 80
  59. \--portmap=8000-8999:80 # ports 8000 to 8999 become 80
  60. .fi
  61. .TP
  62. .NOP \f\*[B-Font]\-s\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-seed\f[]=\f\*[I-Font]number\f[]
  63. Randomize src/dst IPv4/v6 addresses w/ given seed.
  64. This option may appear up to 1 times.
  65. This option must not appear in combination with any of the following options:
  66. fuzz-seed.
  67. This option takes an integer number as its argument.
  68. .sp
  69. Causes the source and destination IPv4/v6 addresses to be pseudo
  70. randomized but still maintain client/server relationships.
  71. Since the randomization is deterministic based on the seed,
  72. you can reuse the same seed value to recreate the traffic.
  73. .TP
  74. .NOP \f\*[B-Font]\-N\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-pnat\f[]=\f\*[I-Font]string\f[]
  75. Rewrite IPv4/v6 addresses using pseudo-NAT.
  76. This option may appear up to 2 times.
  77. This option must not appear in combination with any of the following options:
  78. srcipmap.
  79. .sp
  80. Takes a comma delimited series of colon delimited CIDR
  81. netblock pairs. Each netblock pair is evaluated in order against
  82. the IP addresses. If the IP address in the packet matches the
  83. first netblock, it is rewritten using the second netblock as a
  84. mask against the high order bits.
  85. .sp
  86. IPv4 Example:
  87. .nf
  88. \--pnat=192.168.0.0/16:10.77.0.0/16,172.16.0.0/12:10.1.0.0/24
  89. .fi
  90. IPv6 Example:
  91. .nf
  92. \--pnat=[2001:db8::/32]:[dead::/16],[2001:db8::/32]:[::ffff:0:0/96]
  93. .fi
  94. .TP
  95. .NOP \f\*[B-Font]\-S\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-srcipmap\f[]=\f\*[I-Font]string\f[]
  96. Rewrite source IPv4/v6 addresses using pseudo-NAT.
  97. This option may appear up to 1 times.
  98. This option must not appear in combination with any of the following options:
  99. pnat.
  100. .sp
  101. Works just like the \--pnat option, but only affects the source IP
  102. addresses in the IPv4/v6 header.
  103. .TP
  104. .NOP \f\*[B-Font]\-D\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-dstipmap\f[]=\f\*[I-Font]string\f[]
  105. Rewrite destination IPv4/v6 addresses using pseudo-NAT.
  106. This option may appear up to 1 times.
  107. This option must not appear in combination with any of the following options:
  108. pnat.
  109. .sp
  110. Works just like the \--pnat option, but only affects the destination IP
  111. addresses in the IPv4/v6 header.
  112. .TP
  113. .NOP \f\*[B-Font]\-e\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-endpoints\f[]=\f\*[I-Font]string\f[]
  114. Rewrite IP addresses to be between two endpoints.
  115. This option may appear up to 1 times.
  116. This option must appear in combination with the following options:
  117. cachefile.
  118. .sp
  119. Takes a pair of colon delimited IPv4/v6 addresses which will be used to rewrite
  120. all traffic to appear to be between the two IP addresses.
  121. .sp
  122. IPv4 Example:
  123. .nf
  124. \--endpoints=172.16.0.1:172.16.0.2
  125. .fi
  126. IPv6 Example:
  127. .nf
  128. \--endpoints=[2001:db8::dead:beef]:[::ffff:0:0:ac:f:0:2]
  129. .fi
  130. .TP
  131. .NOP \f\*[B-Font]\-\-tcp\-sequence\f[]=\f\*[I-Font]number\f[]
  132. Change TCP Sequence (and ACK) numbers /w given seed.
  133. This option takes an integer number as its argument.
  134. The value of
  135. \f\*[I-Font]number\f[]
  136. is constrained to being:
  137. .in +4
  138. .nf
  139. .na
  140. greater than or equal to 1
  141. .fi
  142. .in -4
  143. The default
  144. \f\*[I-Font]number\f[]
  145. for this option is:
  146. .ti +4
  147. 0
  148. .sp
  149. Change all TCP sequence numbers, and related sequence-acknowledgement numbers.
  150. They will be shifted by a random amount based on the provided seed.
  151. .TP
  152. .NOP \f\*[B-Font]\-b\f[], \f\*[B-Font]\-\-skipbroadcast\f[]
  153. Skip rewriting broadcast/multicast IPv4/v6 addresses.
  154. .sp
  155. By default \--seed, \--pnat and \--endpoints will rewrite
  156. broadcast and multicast IPv4/v6 and MAC addresses. Setting this flag
  157. will keep broadcast/multicast IPv4/v6 and MAC addresses from being rewritten.
  158. .TP
  159. .NOP \f\*[B-Font]\-C\f[], \f\*[B-Font]\-\-fixcsum\f[]
  160. Force recalculation of IPv4/TCP/UDP header checksums.
  161. .sp
  162. Causes each IPv4/v6 packet to have their checksums recalculated and
  163. fixed. Automatically enabled for packets modified with \fB--seed\fP,
  164. \fB--pnat\fP, \fB--endpoints\fP or \fB--fixlen\fP.
  165. .TP
  166. .NOP \f\*[B-Font]\-\-fixhdrlen\f[]
  167. Alter IP/TCP header len to match packet length.
  168. .sp
  169. By default, tcpreplay will send packets with the original packet length,
  170. However, you may want the packet length revised to minimum packet size.
  171. Using this option, tcpreplay will rewrite (fix) the packet length,
  172. and recalculate checksums when packet length changes.
  173. Caution: undesired packet changes may occur when this option is specified.
  174. .TP
  175. .NOP \f\*[B-Font]\-m\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-mtu\f[]=\f\*[I-Font]number\f[]
  176. Override default MTU length (1500 bytes).
  177. This option may appear up to 1 times.
  178. This option takes an integer number as its argument.
  179. The value of
  180. \f\*[I-Font]number\f[]
  181. is constrained to being:
  182. .in +4
  183. .nf
  184. .na
  185. in the range 1 through MAX_SNAPLEN
  186. .fi
  187. .in -4
  188. .sp
  189. Override the default 1500 byte MTU size for determining the maximum padding length
  190. (--fixlen=pad) or when truncating (--mtu-trunc).
  191. .TP
  192. .NOP \f\*[B-Font]\-\-mtu\-trunc\f[]
  193. Truncate packets larger then specified MTU.
  194. This option may appear up to 1 times.
  195. .sp
  196. Similar to \--fixlen, this option will truncate data in packets from Layer 3 and above to be
  197. no larger then the MTU.
  198. .TP
  199. .NOP \f\*[B-Font]\-E\f[], \f\*[B-Font]\-\-efcs\f[]
  200. Remove Ethernet checksums (FCS) from end of frames.
  201. .sp
  202. Note, this option is pretty dangerous! We do not actually check to see if a FCS
  203. actually exists in the frame, we just blindly delete the last 4 bytes. Hence,
  204. you should only use this if you know know that your OS provides the FCS when
  205. reading raw packets.
  206. .TP
  207. .NOP \f\*[B-Font]\-\-ttl\f[]=\f\*[I-Font]string\f[]
  208. Modify the IPv4/v6 TTL/Hop Limit.
  209. .sp
  210. Allows you to modify the TTL/Hop Limit of all the IPv4/v6 packets. Specify a number to hard-code
  211. the value or +/-value to increase or decrease by the value provided (limited to 1-255).
  212. .sp
  213. Examples:
  214. .nf
  215. \--ttl=10
  216. \--ttl=+7
  217. \--ttl=-64
  218. .fi
  219. .TP
  220. .NOP \f\*[B-Font]\-\-tos\f[]=\f\*[I-Font]number\f[]
  221. Set the IPv4 TOS/DiffServ/ECN byte.
  222. This option may appear up to 1 times.
  223. This option takes an integer number as its argument.
  224. The value of
  225. \f\*[I-Font]number\f[]
  226. is constrained to being:
  227. .in +4
  228. .nf
  229. .na
  230. in the range 0 through 255
  231. .fi
  232. .in -4
  233. .sp
  234. Allows you to override the TOS (also known as DiffServ/ECN) value in IPv4.
  235. .TP
  236. .NOP \f\*[B-Font]\-\-tclass\f[]=\f\*[I-Font]number\f[]
  237. Set the IPv6 Traffic Class byte.
  238. This option may appear up to 1 times.
  239. This option takes an integer number as its argument.
  240. The value of
  241. \f\*[I-Font]number\f[]
  242. is constrained to being:
  243. .in +4
  244. .nf
  245. .na
  246. in the range 0 through 255
  247. .fi
  248. .in -4
  249. .sp
  250. Allows you to override the IPv6 Traffic Class field.
  251. .TP
  252. .NOP \f\*[B-Font]\-\-flowlabel\f[]=\f\*[I-Font]number\f[]
  253. Set the IPv6 Flow Label.
  254. This option may appear up to 1 times.
  255. This option takes an integer number as its argument.
  256. The value of
  257. \f\*[I-Font]number\f[]
  258. is constrained to being:
  259. .in +4
  260. .nf
  261. .na
  262. in the range 0 through 1048575
  263. .fi
  264. .in -4
  265. .sp
  266. Allows you to override the 20bit IPv6 Flow Label field. Has no effect on IPv4
  267. packets.
  268. .TP
  269. .NOP \f\*[B-Font]\-F\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-fixlen\f[]=\f\*[I-Font]string\f[]
  270. Pad or truncate packet data to match header length.
  271. This option may appear up to 1 times.
  272. .sp
  273. Packets may be truncated during capture if the snaplen is smaller then the
  274. packet. This option allows you to modify the packet to pad the packet back
  275. out to the size stored in the IPv4/v6 header or rewrite the IP header total length
  276. to reflect the stored packet length.
  277. .sp 1
  278. \fBpad\fP
  279. Truncated packets will be padded out so that the packet length matches the
  280. IPv4 total length
  281. .sp 1
  282. \fBtrunc\fP
  283. Truncated packets will have their IPv4 total length field rewritten to match
  284. the actual packet length
  285. .sp 1
  286. \fBdel\fP
  287. Delete the packet
  288. .TP
  289. .NOP \f\*[B-Font]\-\-fuzz\-seed\f[]=\f\*[I-Font]number\f[]
  290. Fuzz 1 in X packets. Edit bytes, length, or emulate packet drop.
  291. This option takes an integer number as its argument.
  292. The value of
  293. \f\*[I-Font]number\f[]
  294. is constrained to being:
  295. .in +4
  296. .nf
  297. .na
  298. greater than or equal to 0
  299. .fi
  300. .in -4
  301. The default
  302. \f\*[I-Font]number\f[]
  303. for this option is:
  304. .ti +4
  305. 0
  306. .sp
  307. This fuzzing was designed as to test layer 7 protocols such as voip protocols.
  308. It modifies randomly 1 out of X packets (where X = \fB--fuzz-factor\fP) in order
  309. for stateful protocols to cover more of their code. The random fuzzing actions
  310. focus on data start and end because it often is the part of the data application
  311. protocols base their decisions on.
  312. .sp
  313. Possible fuzzing actions list:
  314. * drop packet
  315. * reduce packet size
  316. * edit packet Bytes:
  317. * Not all Bytes have the same probability of appearance in real life.
  318. Replace with 0x00, 0xFF, or a random byte with equal likelihood.
  319. * Not all Bytes have the same significance in a packet.
  320. Replace the start, the end, or the middle of the packet with equal likelihood.
  321. * do nothing (7 out of 8 packets)
  322. .TP
  323. .NOP \f\*[B-Font]\-\-fuzz\-factor\f[]=\f\*[I-Font]number\f[]
  324. Set the Fuzz 1 in X packet ratio (default 1 in 8 packets).
  325. This option must appear in combination with the following options:
  326. fuzz-seed.
  327. This option takes an integer number as its argument.
  328. The value of
  329. \f\*[I-Font]number\f[]
  330. is constrained to being:
  331. .in +4
  332. .nf
  333. .na
  334. greater than or equal to 1
  335. .fi
  336. .in -4
  337. The default
  338. \f\*[I-Font]number\f[]
  339. for this option is:
  340. .ti +4
  341. 8
  342. .sp
  343. Sets the ratio of for \fB--fuzz-seed\fP option. By default this value is 8,
  344. which means 1 in 8 packets are modified by fuzzing. Note that this ratio is
  345. based on the random number generated by the supplied fuzz seed. Therefore by
  346. default you cannot expect that exactly every eighth packet will be modified.
  347. .TP
  348. .NOP \f\*[B-Font]\-\-skipl2broadcast\f[]
  349. Skip rewriting broadcast/multicast Layer 2 addresses.
  350. .sp
  351. By default, editing Layer 2 addresses will rewrite
  352. broadcast and multicast MAC addresses. Setting this flag
  353. will keep broadcast/multicast MAC addresses from being rewritten.
  354. .TP
  355. .NOP \f\*[B-Font]\-\-dlt\f[]=\f\*[I-Font]string\f[]
  356. Override output DLT encapsulation.
  357. This option may appear up to 1 times.
  358. .sp
  359. By default, no DLT (data link type) conversion will be made.
  360. To change the DLT type of the output pcap, select one of the following values:
  361. .sp 1
  362. \fBenet\fP
  363. Ethernet aka DLT_EN10MB
  364. .sp 1
  365. \fBhdlc\fP
  366. Cisco HDLC aka DLT_C_HDLC
  367. .sp 1
  368. \fBjnpr_eth\fP
  369. Juniper Ethernet DLT_C_JNPR_ETHER
  370. .sp 1
  371. \fBpppserial\fP
  372. PPP Serial aka DLT_PPP_SERIAL
  373. .sp 1
  374. \fBuser\fP
  375. User specified Layer 2 header and DLT type
  376. .br
  377. .TP
  378. .NOP \f\*[B-Font]\-\-enet\-dmac\f[]=\f\*[I-Font]string\f[]
  379. Override destination ethernet MAC addresses.
  380. This option may appear up to 1 times.
  381. .sp
  382. Takes a pair of comma deliminated ethernet MAC addresses which
  383. will replace the destination MAC address of outbound packets.
  384. The first MAC address will be used for the server to client traffic
  385. and the optional second MAC address will be used for the client
  386. to server traffic.
  387. .sp
  388. Example:
  389. .nf
  390. \--enet-dmac=00:12:13:14:15:16,00:22:33:44:55:66
  391. .fi
  392. .TP
  393. .NOP \f\*[B-Font]\-\-enet\-smac\f[]=\f\*[I-Font]string\f[]
  394. Override source ethernet MAC addresses.
  395. This option may appear up to 1 times.
  396. .sp
  397. Takes a pair of comma deliminated ethernet MAC addresses which
  398. will replace the source MAC address of outbound packets.
  399. The first MAC address will be used for the server to client traffic
  400. and the optional second MAC address will be used for the client
  401. to server traffic.
  402. .sp
  403. Example:
  404. .nf
  405. \--enet-smac=00:12:13:14:15:16,00:22:33:44:55:66
  406. .fi
  407. .TP
  408. .NOP \f\*[B-Font]\-\-enet\-subsmac\f[]=\f\*[I-Font]string\f[]
  409. Substitute MAC addresses.
  410. This option may appear up to 9999 times.
  411. .sp
  412. Allows you to rewrite ethernet MAC addresses of packets. It takes
  413. comma delimited pair or MACs address and rewrites all occurrences of
  414. the first MAC with the value of the second MAC.
  415. Example:
  416. .nf
  417. \--enet-subsmac=00:12:13:14:15:16,00:22:33:44:55:66
  418. .fi
  419. .TP
  420. .NOP \f\*[B-Font]\-\-enet\-mac\-seed\f[]=\f\*[I-Font]number\f[]
  421. Randomize MAC addresses.
  422. This option may appear up to 1 times.
  423. This option must not appear in combination with any of the following options:
  424. enet-smac, enet-dmac, enet-subsmac.
  425. This option takes an integer number as its argument.
  426. .sp
  427. Allows you to randomize ethernet MAC addresses of packets, mostly
  428. like what \fB--seed\fP option does for IPv4/IPv6 addresses.
  429. .TP
  430. .NOP \f\*[B-Font]\-\-enet\-mac\-seed\-keep\-bytes\f[]=\f\*[I-Font]number\f[]
  431. Randomize MAC addresses.
  432. This option may appear up to 1 times.
  433. This option must appear in combination with the following options:
  434. enet-mac-seed.
  435. This option takes an integer number as its argument.
  436. The value of
  437. \f\*[I-Font]number\f[]
  438. is constrained to being:
  439. .in +4
  440. .nf
  441. .na
  442. in the range 1 through 6
  443. .fi
  444. .in -4
  445. .sp
  446. Keep some bytes untouched when usinging \fB--enet-mac-seed\fP option.
  447. .TP
  448. .NOP \f\*[B-Font]\-\-enet\-vlan\f[]=\f\*[I-Font]string\f[]
  449. Specify ethernet 802.1q VLAN tag mode.
  450. This option may appear up to 1 times.
  451. .sp
  452. Allows you to rewrite ethernet frames to add a 802.1q header to standard 802.3
  453. ethernet headers or remove the 802.1q VLAN tag information.
  454. .sp 1
  455. \fBadd\fP
  456. Adds an 802.1q VLAN header to the existing 802.3 ethernet header. If
  457. a VLAN header already exists, a new VLAN header is added outside of the
  458. existing header.
  459. .sp
  460. Note that you will be allowed to run this option multiple times to create
  461. more than 2 VLAN headers, however those packets will be valid. At most
  462. you should have 2 X 802.1q VLAN tags, or outer an 802.1ad and an inner 802.1q
  463. VLAN tag.
  464. .sp 1
  465. \fBdel\fP
  466. Rewrites the existing 802.1q VLAN header as an 802.3 ethernet header
  467. .TP
  468. .NOP \f\*[B-Font]\-\-enet\-vlan\-tag\f[]=\f\*[I-Font]number\f[]
  469. Specify the new ethernet 802.1q VLAN tag value.
  470. This option may appear up to 1 times.
  471. This option must appear in combination with the following options:
  472. enet-vlan.
  473. This option takes an integer number as its argument.
  474. The value of
  475. \f\*[I-Font]number\f[]
  476. is constrained to being:
  477. .in +4
  478. .nf
  479. .na
  480. in the range 0 through 4095
  481. .fi
  482. .in -4
  483. .sp
  484. .TP
  485. .NOP \f\*[B-Font]\-\-enet\-vlan\-cfi\f[]=\f\*[I-Font]number\f[]
  486. Specify the ethernet 802.1q VLAN CFI value.
  487. This option may appear up to 1 times.
  488. This option must appear in combination with the following options:
  489. enet-vlan.
  490. This option takes an integer number as its argument.
  491. The value of
  492. \f\*[I-Font]number\f[]
  493. is constrained to being:
  494. .in +4
  495. .nf
  496. .na
  497. in the range 0 through 1
  498. .fi
  499. .in -4
  500. .sp
  501. .TP
  502. .NOP \f\*[B-Font]\-\-enet\-vlan\-pri\f[]=\f\*[I-Font]number\f[]
  503. Specify the ethernet 802.1q VLAN priority.
  504. This option may appear up to 1 times.
  505. This option must appear in combination with the following options:
  506. enet-vlan.
  507. This option takes an integer number as its argument.
  508. The value of
  509. \f\*[I-Font]number\f[]
  510. is constrained to being:
  511. .in +4
  512. .nf
  513. .na
  514. in the range 0 through 7
  515. .fi
  516. .in -4
  517. .sp
  518. .TP
  519. .NOP \f\*[B-Font]\-\-enet\-vlan\-proto\f[]=\f\*[I-Font]string\f[]
  520. Specify VLAN tag protocol 802.1q or 802.1ad.
  521. This option may appear up to 1 times.
  522. .sp
  523. Allows you to specify the protocol of the added VLAN tags.
  524. .sp 1
  525. \fB802.1q\fP
  526. Specifies that 802.1q VLAN headers are to be added. This is the default.
  527. .sp 1
  528. \fB802.1ad\fP
  529. Specifies that 802.1ad Q-in-Q VLAN headers are to be added. To make valid packets,
  530. input packets must already have 802.1q VLAN headers.
  531. .TP
  532. .NOP \f\*[B-Font]\-\-hdlc\-control\f[]=\f\*[I-Font]number\f[]
  533. Specify HDLC control value.
  534. This option may appear up to 1 times.
  535. This option takes an integer number as its argument.
  536. .sp
  537. The Cisco HDLC header has a 1 byte "control" field. Apparently this should
  538. always be 0, but if you can use any 1 byte value.
  539. .TP
  540. .NOP \f\*[B-Font]\-\-hdlc\-address\f[]=\f\*[I-Font]number\f[]
  541. Specify HDLC address.
  542. This option may appear up to 1 times.
  543. This option takes an integer number as its argument.
  544. .sp
  545. The Cisco HDLC header has a 1 byte "address" field which has two valid
  546. values:
  547. .sp 1
  548. \fB0x0F\fP
  549. Unicast
  550. .sp 1
  551. \fB0xBF\fP
  552. Broadcast
  553. .br
  554. You can however specify any single byte value.
  555. .TP
  556. .NOP \f\*[B-Font]\-\-user\-dlt\f[]=\f\*[I-Font]number\f[]
  557. Set output file DLT type.
  558. This option may appear up to 1 times.
  559. This option takes an integer number as its argument.
  560. .sp
  561. Set the DLT value of the output pcap file.
  562. .TP
  563. .NOP \f\*[B-Font]\-\-user\-dlink\f[]=\f\*[I-Font]string\f[]
  564. Rewrite Data-Link layer with user specified data.
  565. This option may appear up to 2 times.
  566. .sp
  567. Provide a series of comma deliminated hex values which will be
  568. used to rewrite or create the Layer 2 header of the packets.
  569. The first instance of this argument will rewrite both server
  570. and client traffic, but if this argument is specified a second
  571. time, it will be used for the client traffic.
  572. .sp
  573. Example:
  574. .nf
  575. \--user-dlink=01,02,03,04,05,06,00,1A,2B,3C,4D,5E,6F,08,00
  576. .fi
  577. .TP
  578. .NOP \f\*[B-Font]\-d\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-dbug\f[]=\f\*[I-Font]number\f[]
  579. Enable debugging output.
  580. This option may appear up to 1 times.
  581. This option takes an integer number as its argument.
  582. The value of
  583. \f\*[I-Font]number\f[]
  584. is constrained to being:
  585. .in +4
  586. .nf
  587. .na
  588. in the range 0 through 5
  589. .fi
  590. .in -4
  591. The default
  592. \f\*[I-Font]number\f[]
  593. for this option is:
  594. .ti +4
  595. 0
  596. .sp
  597. If configured with \--enable-debug, then you can specify a verbosity
  598. level for debugging output. Higher numbers increase verbosity.
  599. .TP
  600. .NOP \f\*[B-Font]\-i\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-intf1\f[]=\f\*[I-Font]string\f[]
  601. Primary interface (listen in uni-directional mode).
  602. This option may appear up to 1 times.
  603. .sp
  604. .TP
  605. .NOP \f\*[B-Font]\-I\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-intf2\f[]=\f\*[I-Font]string\f[]
  606. Secondary interface (send in uni-directional mode).
  607. This option may appear up to 1 times.
  608. .sp
  609. .TP
  610. .NOP \f\*[B-Font]\-u\f[], \f\*[B-Font]\-\-unidir\f[]
  611. Send and receive in only one direction.
  612. This option may appear up to 1 times.
  613. .sp
  614. Normally, tcpbridge will send and receive traffic in both directions
  615. (bi-directionally). However, if you choose this option, traffic will
  616. be sent uni-directionally.
  617. .TP
  618. .NOP \f\*[B-Font]\-\-listnics\f[]
  619. List available network interfaces and exit.
  620. .sp
  621. .TP
  622. .NOP \f\*[B-Font]\-L\f[] \f\*[I-Font]number\f[], \f\*[B-Font]\-\-limit\f[]=\f\*[I-Font]number\f[]
  623. Limit the number of packets to send.
  624. This option may appear up to 1 times.
  625. This option takes an integer number as its argument.
  626. The value of
  627. \f\*[I-Font]number\f[]
  628. is constrained to being:
  629. .in +4
  630. .nf
  631. .na
  632. greater than or equal to 1
  633. .fi
  634. .in -4
  635. The default
  636. \f\*[I-Font]number\f[]
  637. for this option is:
  638. .ti +4
  639. \-1
  640. .sp
  641. By default, tcpbridge will send packets forever or until Ctrl-C. Alternatively,
  642. you can specify a maximum number of packets to send.
  643. .TP
  644. .NOP \f\*[B-Font]\-M\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-mac\f[]=\f\*[I-Font]string\f[]
  645. MAC addresses of local NIC's.
  646. This option may appear up to 2 times.
  647. .sp
  648. tcpbridge does not support detecting the MAC addresses of the local network
  649. interfaces under Windows. Please specify both MAC addresses of the interfaces
  650. used in the bridge: \-M <intf1 mac> \-M <intf2 mac>
  651. .TP
  652. .NOP \f\*[B-Font]\-x\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-include\f[]=\f\*[I-Font]string\f[]
  653. Include only packets matching rule.
  654. This option may appear up to 1 times.
  655. This option must not appear in combination with any of the following options:
  656. exclude.
  657. .sp
  658. Override default of sending all packets stored in the capture file and only
  659. send packets which match the provided rule. Rules can be one of:
  660. .sp
  661. .sp
  662. .IR "S:<CIDR1>,..."
  663. - Source IP must match specified CIDR(s)
  664. .sp
  665. .IR "D:<CIDR1>,..."
  666. - Destination IP must match specified CIDR(s)
  667. .sp
  668. .IR "B:<CIDR1>,..."
  669. - Both source and destination IP must match specified CIDR(s)
  670. .sp
  671. .IR "E:<CIDR1>,..."
  672. - Either IP must match specified CIDR(s)
  673. .sp
  674. .IR "P:<LIST>"
  675. - Must be one of the listed packets where the list
  676. corresponds to the packet number in the capture file.
  677. .nf
  678. \--include=P:1-5,9,15,72-
  679. .fi
  680. would send packets 1 through 5, the 9th and 15th packet, and packets 72 until the
  681. end of the file
  682. .sp
  683. .IR "F:'<bpf>'"
  684. - BPF filter. See the \fItcpdump(8)\fP man page for syntax.
  685. .br
  686. .TP
  687. .NOP \f\*[B-Font]\-X\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-exclude\f[]=\f\*[I-Font]string\f[]
  688. Exclude any packet matching this rule.
  689. This option may appear up to 1 times.
  690. This option must not appear in combination with any of the following options:
  691. include.
  692. .sp
  693. Override default of sending all packets stored in the capture file and only
  694. send packets which do not match the provided rule. Rules can be one of:
  695. .sp
  696. .sp
  697. .IR "S:<CIDR1>,..."
  698. - Source IP must not match specified CIDR(s)
  699. .sp
  700. .IR "D:<CIDR1>,..."
  701. - Destination IP must not match specified CIDR(s)
  702. .sp
  703. .IR "B:<CIDR1>,..."
  704. - Both source and destination IP must not match specified CIDR(s)
  705. .sp
  706. .IR "E:<CIDR1>,..."
  707. - Either IP must not match specified CIDR(s)
  708. .sp
  709. .IR "P:<LIST>"
  710. - Must not be one of the listed packets where the list
  711. corresponds to the packet number in the capture file.
  712. .nf
  713. \--exclude=P:1-5,9,15,72-
  714. .fi
  715. would drop packets 1 through 5, the 9th and 15th packet, and packets 72 until the
  716. end of the file
  717. .br
  718. .TP
  719. .NOP \f\*[B-Font]\-P\f[], \f\*[B-Font]\-\-pid\f[]
  720. Print the PID of tcpbridge at startup.
  721. .sp
  722. .TP
  723. .NOP \f\*[B-Font]\-v\f[], \f\*[B-Font]\-\-verbose\f[]
  724. Print decoded packets via tcpdump to STDOUT.
  725. This option may appear up to 1 times.
  726. .sp
  727. .TP
  728. .NOP \f\*[B-Font]\-A\f[] \f\*[I-Font]string\f[], \f\*[B-Font]\-\-decode\f[]=\f\*[I-Font]string\f[]
  729. Arguments passed to tcpdump decoder.
  730. This option may appear up to 1 times.
  731. This option must appear in combination with the following options:
  732. verbose.
  733. .sp
  734. When enabling verbose mode (\fB-v\fP) you may also specify one or more
  735. additional arguments to pass to \fBtcpdump\fP to modify the way packets
  736. are decoded. By default, \-n and \-l are used. Be sure to
  737. quote the arguments like: \--verbose="-axxx" so that they are not interpreted
  738. by tcpbridge. The following arguments are valid:
  739. [ \-aAeNqRStuvxX ]
  740. [ \-E spi@ipaddr algo:secret,... ]
  741. [ \-s snaplen ]
  742. .TP
  743. .NOP \f\*[B-Font]\-V\f[], \f\*[B-Font]\-\-version\f[]
  744. Print version information.
  745. .sp
  746. .TP
  747. .NOP \f\*[B-Font]\-h\f[], \f\*[B-Font]\-\-less\-help\f[]
  748. Display less usage information and exit.
  749. .sp
  750. .TP
  751. .NOP \f\*[B-Font]\-w\f[], \f\*[B-Font]\-\-suppress\-warnings\f[]
  752. suppress printing warning messages.
  753. .sp
  754. .TP
  755. .NOP \f\*[B-Font]\-H\f[], \f\*[B-Font]\-\-help\f[]
  756. Display usage information and exit.
  757. .TP
  758. .NOP \f\*[B-Font]\-\&!\f[], \f\*[B-Font]\-\-more-help\f[]
  759. Pass the extended usage information through a pager.
  760. .TP
  761. .NOP \f\*[B-Font]\-\-save-opts\f[] [=\f\*[I-Font]cfgfile\f[]]
  762. Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP
  763. configuration file listed in the \fBOPTION PRESETS\fP section, below.
  764. The command will exit after updating the config file.
  765. .TP
  766. .NOP \f\*[B-Font]\-\-load-opts\f[]=\f\*[I-Font]cfgfile\f[], \f\*[B-Font]\-\-no-load-opts\f[]
  767. Load options from \fIcfgfile\fP.
  768. The \fIno-load-opts\fP form will disable the loading
  769. of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early,
  770. out of order.
  771. .PP
  772. .SH "OPTION PRESETS"
  773. Any option that is not marked as \fInot presettable\fP may be preset
  774. by loading values from configuration ("RC" or ".INI") file(s).
  775. The \fIhomerc\fP file is "\fI$$/\fP", unless that is a directory.
  776. In that case, the file "\fI.tcpbridgerc\fP"
  777. is searched for within that directory.
  778. .SH "FILES"
  779. See \fBOPTION PRESETS\fP for configuration files.
  780. .SH "EXIT STATUS"
  781. One of the following exit values will be returned:
  782. .TP
  783. .NOP 0 " (EXIT_SUCCESS)"
  784. Successful program execution.
  785. .TP
  786. .NOP 1 " (EXIT_FAILURE)"
  787. The operation failed or the command syntax was not valid.
  788. .TP
  789. .NOP 66 " (EX_NOINPUT)"
  790. A specified configuration file could not be loaded.
  791. .TP
  792. .NOP 70 " (EX_SOFTWARE)"
  793. libopts had an internal operational error. Please report
  794. it to autogen-users@lists.sourceforge.net. Thank you.
  795. .PP
  796. .SH "AUTHORS"
  797. Copyright 2013-2024 Fred Klassen \- AppNeta
  798. Copyright 2000-2012 Aaron Turner
  799. For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
  800. The latest version of this software is always available from:
  801. http://tcpreplay.appneta.com/
  802. .SH "COPYRIGHT"
  803. Copyright (C) 2000-2024 Aaron Turner and Fred Klassen all rights reserved.
  804. This program is released under the terms of the GNU General Public License, version 3 or later.
  805. .SH "BUGS"
  806. Please send bug reports to: tcpreplay-users@lists.sourceforge.net
  807. .SH "NOTES"
  808. This manual page was \fIAutoGen\fP-erated from the \fBtcpbridge\fP
  809. option definitions.