tcpreplay : -T option

标签 tcp udp ip ethernet packet-injection

tcpreplay中有一个非常有用的功能,根据official FAQ's ,使用参数 -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.

不幸的是,-T 在手册页中似乎有所不同:

-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

此选项在最新版本的 tcpreplay 中是否被删除

最佳答案

是的,它被分成tcprewrite (转换捕获文件),然后选项被合并回命令tcpreplay-edit中。

FAQ显示 tcpreplay-edit --mtu-trunc 现在相当于之前的 -T 选项,并且应该暗示 -C 来更正校验和,但如果您不处理标准 1500,则可能需要 --mtu=n ,或者如果问题的一部分是 header 和集合时的实际长度不一致,则可能需要 -F时间。

关于tcpreplay : -T option,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17723157/

相关文章:

java - 通过 TCP 和公共(public) IP 连接,无需转发

c# - 处理远程连接时要听什么 ip? 127.0.0.1 还是实际 IP?

c# - 如何在没有端口转发的情况下进行UDP

amazon-web-services - 创建后保留静态IP,限时使用

c - 从服务器运行程序并将其连接到同一客户端

c - libuv在建立多个连接时速度慢?

networking - docker 容器是否有自己的 TCP/IP 堆栈?

c++ - 为什么UDP服务器上的UDP客户端端口会发生变化

java - Java中的UDP编程

ip - 使用ngrok时如何获取传入请求的IP?