排错-tcpreplay回放错误:send() [218] Message too long (errno = 90)

标签:
tcpreplaysendmessagetoolong |
分类: 操作系统服务器 |
排错-tcpreplay回放错误:send() [218] Message too long (errno = 90)
by:授客 QQ:1033553122
问题描述:
tcpreplay回放.pcap报文出现如下错误
Warning: Unable to send packet: Error with PF_PACKET send() [215]: Message too long (errno = 90)
Warning: Unable to send packet: Error with PF_PACKET send() [215]: Message too long (errno = 90)
Warning: Unable to send packet: Error with PF_PACKET send() [215]: Message too long (errno = 90)
wireshake打开数据包,可以看到数据包长度,其中有超过1w的,已经超过了MTU值(MTU默认为1500),所以问题的解决方法是修改系统的MTU值。
723
0.076477
解决方法:
修改发送数据包网卡的MTU值
例:
# ifconfig eth3 mtu 9216
重新发包
#tcpreplay -i eth3 -t -l 1 xx.pcap
发现正常发包了
说明:
每一种链路层协议都规定了帧的数据部分的长度上限--最大传送单元(MTU,Maximum Transfer Unit),如下
http://sucimg.itc.cn/sblog/o7dfa737a6cbe6d279b8efc276b42d5f8[218]