今天在使用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. 善于 调用Windows API

    前一段时间看见别人做的一个自动填写信息并且点击登录的程序,觉得很有意思. 其实就是在程序中调用Windows的API,那么如何调用,下面就做个简单的介绍. 写的简单粗暴, 不喜轻喷. 0.首先引入名称 ...

  2. hdu3507

    题意: 给n(n<=10^6)个非负数字,放在一个数组num中,再给一个特殊值m.求将这个数组分成任意多个区间,每个区间[a,b]的值定义为( sigma(num[i] | (a<=i&l ...

  3. 用U盘和iso镜像文件重装系统

    工具: 1.硬件: 容量最好在2.5G以上u盘(比如这次是2.3G的winows_7_32位_中文专业版ISO,我的U盘容量是不到8G). 2.软件: a.Ultraiso软件,来制作u盘启动项 b. ...

  4. 保存属性至xml并读取

    import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import ja ...

  5. Asp MVC 中处理JSON 日期类型

    注:时间有点忙,直接copy 过来的,要查看原址: http://www.developer.com/net/dealing-with-json-dates-in-asp.net-mvc.html I ...

  6. MySQL float 与decimal 各中的区别。

    想一个问题: 1/3+1/3+1/3=1.0 0.3+0.3+0.3 =0.9 想一想在小数的世界里要什么表示1/3呢!它的办法就是取一个与1/3十分接近的小数来代替:如上面例子中的0.3来代替1/3 ...

  7. c++ 静态多态与动态多态

    多态polymorphism是指具有多种形态的情况,它能根据单一的标记关联不同的行为.多态是面向对象程序设计的基础.在面向对象程序设计中的多态是一种运行时的多态.C++中有两种多态,称为动多态(运行时 ...

  8. Oracle 11g 的server结果缓存result_cache_mode

    对于常常要查的结果集,返回少量记录,server端是能够缓存的,结果集保存在共享池中,假设是绑定变量,绑定变量的值也要一样. SQL> show parameter result_cache N ...

  9. HEVC与VP9编码效率对比

    HEVC(High EfficiencyVideo Coding,高效率视频编码)是一种视频压缩标准,H.264/MPEG-4 AVC的继任者.目前正在由ISO/IEC MPEG和ITU-T VCEG ...

  10. vim之执行shell命令

    vim中执行shell命令,有以下几种形式 (1) :!command 不退出vim, 并执行shell命令command, 将命令输出显示在vim的命令区域,不会改变当前编辑的文件的内容 (2)   ...