Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Packets slowly drift further and further randomly when played or sent using tcpreplay #829

Open
anoopcc99 opened this issue Nov 9, 2023 · 1 comment

Comments

@anoopcc99
Copy link

Describe the bug
take a time sensitive pcap file and send it interface using tcpreplay, the captured packets at the other end of interface seen does not honor the packet interval time difference, instead varies randomly.
transmit pcap file:
image

Captured pcap file:
image

Time Drift:
Picture1

To Reproduce
Steps to reproduce the behavior:

  1. take any timestamp based pcap file
  2. send the pcap file using tcpreplay to the interface
  3. capture the incoming packets on other end on interface
  4. note the time drift

Expected behavior
I would expect the time drift to be constant or minimum.

System (please complete the following information):

  • OS: "Ubuntu 22.04 LTS"
  • OS version: "22.04 LTS (Jammy Jellyfish)"
  • TcpReplay Version: 4.3.4
@Weissle
Copy link

Weissle commented Dec 5, 2023

Met this issue before.
When we replay with the origin speed, tcpreplay sleeps according to the time gap between two package.
However, the overhead like sending package and waking up thread are ignored. These overheads are accumulated little by little which lead to the drift.
relative code is here. https://github.com/appneta/tcpreplay/blob/43693c4a92dda227a5134ae5e71a7247ae345323/src/send_packets.c#L468C23-L468C23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants