This is our old Q&A Site. Please post any new questions and answers at

I'm new to networking, so sorry in advance if my question is unclear. I have auto generated pcaps, each with one TCP flow which I would like to transmit using a traffic generator. The problem is that on those pcaps both the peers have the same IP, which is something the traffic generator does not like.

So, I tried to change the IPs using tcprewrite --endpoints. It worked for some pcaps. For others I got a strange behavior where the sender is always IP1 and the receiver is always IP2, (i.e the traffic always goes from IP1 to IP2, instead of being bidirectional). For example:

21:41:48.477466 IP > localhost.55617: Flags [P.], seq 2055024698:2055024710, ack ... 21:41:48.477907 IP > localhost.5901: Flags [P.], seq 920220669:920220681, ack ... 21:41:48.478148 IP > localhost.55617: Flags [P.], seq 12:14, ack 13, ... 21:41:48.478213 IP > localhost.5901: Flags [P.], seq 12:13, ack 3, ... 21:41:48.478495 IP > localhost.55617: Flags [P.], seq 14:30, ack 14, ... 21:41:51.383253 IP > localhost.5901: Flags [P.], seq 13:29, ack 19, ... 21:41:51.383418 IP > localhost.55617: Flags [P.], seq 30:34, ack 30, ... 21:41:51.383657 IP > localhost.5901: Flags [P.], seq 29:30, ack 23, ...

Also now I have 2 flows, since the IPs got scrambles in relation to the ports (the ports stayed the same as they were).

Any idea what might cause this problem? Or is there a way to achieve what I want without tcprewrite?

Thanks Alot

asked 11 Jun '17, 07:04

eladw's gravatar image

accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 Jun '17, 07:04

question was seen: 429 times

last updated: 11 Jun '17, 07:04

p​o​w​e​r​e​d by O​S​Q​A