今天在使用tcpreplay重放流量时,发现有的数据包没有发送成功:

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() [216]: Message too long (errno = 90)
Warning: Unable to send packet: Error with PF_PACKET send() [218]: Message too long (errno = 90)
Warning: Unable to send packet: Error with PF_PACKET send() [219]: Message too long (errno = 90)
Warning: Unable to send packet: Error with PF_PACKET send() [234]: Message too long (errno = 90)
Actual: 459 packets (386911 bytes) sent in 0.03 seconds. Rated: 12897033.0 bps, 98.40 Mbps, 15300.00 pps
Statistics for network device: eth0
Attempted packets: 235
Successful packets: 217
Failed packets: 18
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
Statistics for network device: eth0
Attempted packets: 224
Successful packets: 224
Failed packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0

从错误提示看出,应该是数据包太大了。我查看了一下发送的数据包:

10:20:39.019199 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 323602:326522, ack 1978, win 31, length 2920
10:20:39.019298 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 326522, win 543, length 0
10:20:39.047511 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 326522:329442, ack 1978, win 31, length 2920
10:20:39.047559 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 329442, win 543, length 0
10:20:39.047665 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 329442:330902, ack 1978, win 31, length 1460
10:20:39.075783 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 330902:333822, ack 1978, win 31, length 2920
10:20:39.075824 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 333822, win 543, length 0
10:20:39.104001 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 333822:336742, ack 1978, win 31, length 2920
10:20:39.104049 IP xyw-Eliot.local.53720 > xyw-Eliot.local.http: Flags [.], ack 336742, win 543, length 0
10:20:39.104322 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 336742:338202, ack 1978, win 31, length 1460
10:20:39.132219 IP xyw-Eliot.local.http > xyw-Eliot.local.53720: Flags [.], seq 338202:339662, ack 1978, win 31, length 1460

发现数据包长度已经超过1500(MTU默认为1500),所以问题的解决方法是修改系统的MTU值。

先说一下我的系统环境:ubuntu 12.04

linux系统修改MTU的方法比较简单,一个命令即可:

sudo ifconfig eth0 mtu 3000

这是将网卡eth0的MTU值设置为3000,这样再重新放包,发现数据包被全部发送:

sending out eth0 eth0
processing file: tcp_rewrite.pcap
Actual: 459 packets (386911 bytes) sent in 0.04 seconds. Rated: 9672775.0 bps, 73.80 Mbps, 11475.00 pps
Statistics for network device: eth0
Attempted packets: 235
Successful packets: 235
Failed packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0
Statistics for network device: eth0
Attempted packets: 224
Successful packets: 224
Failed packets: 0
Retried packets (ENOBUFS): 0
Retried packets (EAGAIN): 0

本文为Eliot原创,转载请注明出处:
http://blog.csdn.net/xyw_blog/article/details/10741919

Warning: Unable to send packet: Error with PF_PACKET send() [11]: Message too long (errno = 90)的更多相关文章

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

    排错-tcpreplay回放错误:send() [218] Message too long (errno = 90) by:授客 QQ:1033553122 问题描述: tcpreplay回放.pc ...

  2. mysql之 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11

    问题描述:启动MySQL后,出现连接不上,报 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 11[root@mysql01 ~]# service ...

  3. [DUBBO] Unexpected error occur at send statistic, cause: Forbid consumer 192.168.3.151 access servic

    [DUBBO] Unexpected error occur at send statistic, cause: Forbid consumer 192.168.3.151 access servic ...

  4. xmodmap: unable to open display '' Error: Couldn't connect to XServer passing null display

    /********************************************************************************* * xmodmap: unable ...

  5. 【Mac 10.13.0】安装 libimobiledevice,提示报错:warning: unable to access '/Users/lucky/.config/git/attributes': Permission denied解决方案

    打开终端,执行命令: 1.sudo chown -R XXX /usr/local  (XXX表示当前用户名) 2.ruby -e "$(curl -fsSL https://raw.git ...

  6. 【开发笔记】- Idea启动Gradle报错:Warning:Unable to make the module: reading, related gradle configuration was not found. Please, re-import the Gradle project and try again

    报错信息: Warning:Unable to make the module: reading, related gradle configuration was not found. Please ...

  7. VirtualBox问题解决合集 - [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message

    转载:https://blog.csdn.net/mychangee/article/details/104954262 问题描述:[drm:vmw_host_log [vmwgfx]] ERROR  ...

  8. 记一次Jenkins 打包异常 ERROR: Exception when publishing, exception message [Failure]

    今天早上打包一直都没有问题,突然有一次打包突然出现异常现象,如下: ERROR: Exception when publishing, exception message [Failure] Buil ...

  9. git push ERROR: missing Change-Id in commit message footer

    今天上传代码时候报告错误:$ git push origin HEAD:refs/for/branch*Counting objects: 7, done.Delta compression usin ...

随机推荐

  1. Jquery中的delegate()使用方法介绍

    delegate() 方法为指定的元素(属于被选元素的子元素)添加一个或多个事件处理程序,并规定当这些事件发生时运行的函数 delegate定义和用法 delegate() 方法为指定的元素(属于被选 ...

  2. char *p 和char *p[]

    char *p 和char *p[]区别 char* p是一个指针,根本没分配内存,他指向的"abc123ABC" 是只读的,不能改变,在下面给他赋值是错的 而char p[]是一 ...

  3. BZOJ 3230: 相似子串( RMQ + 后缀数组 + 二分 )

    二分查找求出k大串, 然后正反做后缀数组, RMQ求LCP, 时间复杂度O(NlogN+logN) -------------------------------------------------- ...

  4. js写的简单轮播图

    这个轮播图代码是从网上找来的,专门找了个写法简单的,只是作为一个小练习,大概原理如下: 1.首先是图片切换2.自动播放3.调用自动播放4.移动到容器上边停止播放,离开自动播放5.移动到导航上停止播放, ...

  5. Android Sdk 国内镜像下载地址

    大连东软信息学院镜像服务器地址:- http://mirrors.neusoft.edu.cn 端口:80北京化工大学镜像服务器地址:- IPv4: http://ubuntu.buct.edu.cn ...

  6. PHP中include和require的区别

    include和require的区别,其实两者没有太大的区别,如果要包含的文件不存在,include提示notice,然后继续执行下面的语句,require提示致命错误并且退出. 根据测试,win32 ...

  7. [转载]Heritrix 提高效率的若干方法

    摘自http://blog.sina.com.cn/s/blog_6cc084c90100nf39.html --------------------------------------------- ...

  8. 树莓派高级GPIO库,wiringpi2 for python使用笔记(五)i2c读取测试

    wiringpi2显然也把i2c驱动带给了Python,手头上正巧有一个DS3231的模块,上边带了一个DS3231 RTC(实时时钟),与一片24C32,两个芯片均为iic总线设备,与树莓派接线如下 ...

  9. Angular ng-repeat 对象和数组遍历

    直接上代码 <!DOCTYPE html> <html> <head> <meta name="description" content= ...

  10. 安装AppManager

    http://www.searchvirtual.com.cn/showcontent_66884.htm