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

Unexpected packet counts with --loop and --cachefile enabled #75

Closed
fklassen opened this issue Mar 12, 2014 · 0 comments
Closed

Unexpected packet counts with --loop and --cachefile enabled #75

fklassen opened this issue Mar 12, 2014 · 0 comments
Assignees
Milestone

Comments

@fklassen
Copy link
Member

From Thomas McMurphy:

Version information (output of -V)
tcpreplay version: 4.0.3 (build git:v4.0.3)
Copyright 2013-2014 by Fred Klassen -
AppNeta Inc.
Copyright 2000-2012 by Aaron Turner
The entire Tcpreplay Suite is licensed under the GPLv3
Cache file supported: 04
Not compiled with libdnet.
Compiled against libpcap: 1.5.3
64 bit packet counters: enabled
Verbose printing via tcpdump: enabled
Packet editing: disabled
Fragroute engine: disabled
Injection method: PF_PACKET send()

Platform (Red Hat Linux 9 on Intel, Solaris 7 on SPARC, etc)
Debian 3.11.8-1

Make & model of the network card(s) and driver(s) version
Card: Intel Corporation Ethernet 10G 2P X520 Adapter (rev 01)
Driver: ixgbe 3.18.7

If possible, attach the pcap file used (compressed with bzip2 or gzip preferred)
bigFlows.pcap from http://tcpreplay.appneta.com/wiki/captures.html

Detailed description of your problem or what you are trying to accomplish
I have a linux host with two interfaces 'traffic1' and 'traffic2'.
Both of these interfaces are connected to each other through a switch.
With this setup I am trying to test a pcap/cachefile pair for
bidirectional replay.

To create the cachefile I used the following command:
/usr/local/bin/tcpprep --auto=client --pcap=bigFlows.pcap
--cachefile=bigFlows.cache

Then used the following command to replay the file one time:
/usr/local/bin/tcpreplay --loop=1 --quiet --topspeed
--cachefile=bigFlows.cache --intf1=traffic1 --intf2=traffic2
bigFlows.pcap

And received the following report:
Actual: 791615 packets (355417784 bytes) sent in 0.602658 seconds.
Rated: 589750379.1 Bps, 4718.00 Mbps, 1313539.35 pps
Flows: 40686 flows, 67510.92 fps, 791179 flow packets, 436 non-flow
Statistics for network device: traffic1
Attempted packets: 584308
Successful packets: 584308
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
Flows total: 28397
Flows unique: 0
Flows expired: 0
Flow packets: 584308
Non-flow packets: 0
Invalid flow packets: 0
Statistics for network device: traffic2
Attempted packets: 207307
Successful packets: 207307
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
Flows total: 12289
Flows unique: 0
Flows expired: 0
Flow packets: 206871
Non-flow packets: 436
Invalid flow packets: 0

After that I ran the following command to replay the file two times:
/usr/local/bin/tcpreplay --loop=2 --quiet --topspeed
--cachefile=bigFlows.cache --intf1=traffic1 --intf2=traffic2
bigFlows.pcap

And received the following report:
Actual: 791615 packets (355417784 bytes) sent in 0.846339 seconds.
Rated: 419947307.1 Bps, 3359.57 Mbps, 935340.33 pps
Flows: 40686 flows, 48072.93 fps, 1582358 flow packets, 872 non-flow
Statistics for network device: traffic1
Attempted packets: 584308
Successful packets: 584308
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
Flows total: 28397
Flows unique: 0
Flows expired: 0
Flow packets: 584308
Non-flow packets: 0
Invalid flow packets: 0
Statistics for network device: traffic2
Attempted packets: 207307
Successful packets: 207307
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
Flows total: 12289
Flows unique: 0
Flows expired: 0
Flow packets: 206871
Non-flow packets: 436
Invalid flow packets: 0

Now with the second run I was expecting to see twice as many packets
transmitted as the first. To confirm the packet counts are really the
same I reran the tcpreplay commands again with tcpdump running on both
traffic interfaces. For both scenarios, tcpreplay and tcpdump reports
that 791615 packets were seen.

I have tried replaying the file again without the '--intf2' or
'--cachefile' options and I am seeing the packet count values I was
expecting.

/usr/local/bin/tcpreplay --quiet --topspeed --intf1=traffic1 bigFlows.pcap
Actual: 791615 packets (355417784 bytes) sent in 0.749699 seconds.
Rated: 474080643.0 Bps, 3792.64 Mbps, 1055910.43 pps
Flows: 40686 flows, 54269.78 fps, 791179 flow packets, 436 non-flow
Statistics for network device: traffic1
Attempted packets: 791615
Successful packets: 791615
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0

/usr/local/bin/tcpreplay --loop=2 --quiet --topspeed --intf1=traffic1
bigFlows.pcap
Actual: 1583230 packets (710835568 bytes) sent in 1.04 seconds.
Rated: 481899875.8 Bps, 3855.19 Mbps, 1073326.06 pps
Flows: 40686 flows, 27582.43 fps, 3164716 flow packets, 1744 non-flow
Statistics for network device: traffic1
Attempted packets: 1583230
Successful packets: 1583230
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0

  • Is the behaviour the result of something I've done wrong?
  • Anyone got ideas for more tests I can run to narrow down the issue?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant