html tool

2020年7月1日星期三

【完成】问题:两个真实主机之间,pcap回放udp server 不接收问题IIII

https://stackoverflow.com/questions/13471680/udp-multicast-client-does-not-see-udp-multicast-traffic-generated-by-tcpreplay
找到原因了,

That could happen if the machine where you run tcpdump has IP or UDP checksum offloading enabled. That means the packages you capture locally haven't their checksums calculated yet, which the hardware does before sending them out. When you then tcpreplay those packets, the checksums are not calculated, as tcpreplay works on a lower level than the socket API you used to generate the packets.

In order to verify the correctness of the checksums (both those of the dump file as well as those of the packets spit out by the subsequent tcpreplay), tcpdump -v ... will warn you about wrong checksums. wireshark also colors wrongly checksummed frames differently (unless turned off in the wireshark settings).

Did you try to tcpdump the packets only on the sending host, or also on the receiving host? The latter would remove the checksum errors, if that is indeed your problem.


处理方式:

Ya, this happened to me. I could check it with Wireshark (after I enabled proper settings in it), and also doing: "tcrpewrite --fixcsum --infille in.pcap --outfile out.pcap", and then passing out.pcap to tcpreplay (it worked then). – bingen Aug 18 '16 at 18:27 


自己测试通过使用

tcprewrite --fixcsum --infile 9999.pcap --outfile 9999_new.pcap 

之后回放 9999_new.pcap 就ok了,ok,问题终结了,mark一下。

给自己人工点个赞吧,感觉自己的udp 还真是一知半解啊:)努力:)


1 条评论:

  1. 参考 :https://arthurchiao.art/blog/tuning-stack-rx-zh/#1132-__udp4_lib_rcv
    以及 dropwatch的使用

    回复删除