Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1219172
  • 博文数量: 135
  • 博客积分: 10576
  • 博客等级: 上将
  • 技术积分: 1670
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-11 20:49
个人简介

不疯魔,不成活! --疯魔老杨(Crazy.LaoYang) http://www.inotes.cn/

文章分类

全部博文(135)

文章存档

2014年(4)

2012年(13)

2011年(5)

2010年(30)

2009年(56)

2008年(27)

分类: 系统运维

2010-09-07 11:06:47

关于“Packet size limited during capture”的解释
(源自:杨志刚 博客 http://yangzhigang.cublog.cn)
 
前言:
在linux下用tcpdump抓取http数据包,之后用wireshark打开,发现数据包的内容是不全的,如图:
这时,想分析和获取http包中的内容是不可能是,在图中可以发现,wireshark给出了“Packet size limited during cap”的提示,和:“HTTP truncated”的提示。这是什么呢?

对于这个问题,一个“外国朋友的MAIL中”给了非常好的解答,MAIL部分原文如下:
Maynard, Chris wrote:
"Packet Size limited during capture" tells me that the packet was bigger than the snaplen set, so the packet was truncated when captured.  In Wireshark, the snaplen is set in the capture options dialog using the "Limit each packet to ___ bytes" option, and with dumpcap, tshark and tcpdump it is set via the "-s " option.  If not specified, tcpdump uses a default snaplen of 68 (or 96, depending on the platform).
非常感谢这位外国朋友在MAIL中的解释。
 
这个问题主要有两方面的原因:
1)在wireshark等包分析软件中,可以设置包的长度,如果不当可能回出现这个问题; wireshark的设置如下图(在[Capture]---[Options]下配置):
 
 
2)用Tcpdump进行抓包时,没有用-s参数指定抓取数据的长度,采用了默认长度为68或96字节;-s0则表示没有长度的限制。
阅读(13838) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~