In tcpreplay
there is a very useful feature which, according to the official FAQ's, is called with parameter -T
:
The packet length (in this case 8892 bytes) is greater then the maximum transmition unit (MTU) on the outgoing interface. Tcpreplay must skip the packet. Alternatively, you can specify the -T option and tcpreplay will truncate the packet to the MTU size, fix the checksums and send it.
Unfortunately, -T
appears to be something different in the man page:
-T string, --timer=string
Select packet timing mode: select, ioport, rdtsc, gtod, nano, abstime. This option may appear up to 1 times. The default string for this option is:
gtod
Allows you to select the packet timing method to use:
nano - Use nanosleep() API
select - Use select() API
ioport - Write to the i386 IO Port 0x80
rdtsc - Use the x86/x86_64/PPC RDTSC
gtod [default] - Use a gettimeofday() loop
abstime - Use OS X's AbsoluteTime API
Has this option been removed in more recent versions of tcpreplay?
Yes, it was separated into tcprewrite
(which transforms capture files) and then the options were merged back in the command tcpreplay-edit
.
The FAQ shows tcpreplay-edit --mtu-trunc
is now the equivalent of the previous -T
option and should imply -C
to correct the checksum, but you may need --mtu=n
if you aren't dealing with a standard 1500 or need -F
if part of the problem is inconsistent header and real length at collection time.