gpt4 book ai didi

tcpreplay - 使用 tcpreplay 时尽管数据包失败仍继续

转载 作者:行者123 更新时间:2023-12-05 04:55:56 28 4
gpt4 key购买 nike

我正在尝试使用 tcpreplay 发送 pcap 文件的内容。它拒绝发送一些数据包,因为它们太长了。但是,它没有继续处理下一个数据包,而是停止了:

 $ tcpreplay -i p4p1 multi.pcap
Warning: May need to run as root to get access to all network interfaces.
Warning: Unable to send packet: Error with PF_PACKET send() [444]: Message too long (errno = 90)
Actual: 443 packets (63852 bytes) sent in 0.203486 seconds
Rated: 313790.6 Bps, 2.51 Mbps, 2177.05 pps
Flows: 115 flows, 565.14 fps, 405 flow packets, 39 non-flow
Statistics for network device: p4p1
Successful packets: 443
Failed packets: 1
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0

我想跳过失败的数据包并发送其余的数据包。

最佳答案

我在处理多个文件时遇到了同样的问题,尤其是在流媒体方面。示例:

~# tcpreplay -i eth1 -t -K facebook_audio2b.pcapng
File Cache is enabled
Warning: Unable to send packet: Error with PF_PACKET send() [1611]: Message
too long (errno = 90)
Actual: 1610 packets (382007 bytes) sent in 0.021233 seconds
Rated: 17991192.9 Bps, 143.92 Mbps, 75825.36 pps
Flows: 71 flows, 3343.85 fps, 94008 flow packets, 84 non-flow
Statistics for network device: eth1
Successful packets: 1610
Failed packets: 1
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0

我所以我在 [link].( https://tcpreplay.appneta.com/wiki/faq.html#packet-length-8892-is-greater-then-mtu-skipping-packet ) 上关注了 Tcpreplay 网站上的常见问题解答,上面写着:

如果数据包大于 MTU,或者,您可以指定 tcpreplay-edit --mtu-trunc 选项 - 数据包将被截断为 MTU 大小,校验和将被修复,然后发送。请注意,这可能会影响性能。

它在下一次运行中对我有用:

~# tcpreplay-edit --mtu-trunc -i eth1 -t -K facebook_audio2b.pcapng
File Cache is enabled
Actual: 94092 packets (14586277 bytes) sent in 0.847842 seconds
Rated: 17204003.8 Bps, 137.63 Mbps, 110978.22 pps
Flows: 71 flows, 83.74 fps, 94008 flow packets, 84 non-flow
Statistics for network device: eth1
Successful packets: 94092
Failed packets: 0
Truncated packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0

关于tcpreplay - 使用 tcpreplay 时尽管数据包失败仍继续,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65123022/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com