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

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

by:授客 QQ1033553122

问题描述:

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    10.130.39.1 10.130.39.9 TCP 52191 > cvmmon [PSH, ACK] Seq=75174 Ack=1 Win=65535 Len=11546

 

解决方法:

修改发送数据包网卡的MTU

例:

# ifconfig eth3 mtu 9216

 

重新发包

#tcpreplay -i eth3 -t -l 1 xx.pcap

发现正常发包了

 

说明:

每一种链路层协议都规定了帧的数据部分的长度上限--最大传送单元(MTU,Maximum Transfer Unit),如下

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

 

原文地址:https://www.cnblogs.com/shouke/p/10158093.html