[RK_2014_0923]wireshark捕捉到的Ethernet II数据包的最小长度为60,wireshark


一、关于wireshark中以太网数据包的最小长度,请看下面的文字:

Packet format

A physical Ethernet packet will look like this:

Preamble

Destination MAC address

Source MAC address

Type/Length

User Data

Frame Check Sequence (FCS)

8

6

6

2

46 - 1500

4

As the Ethernet hardware filters the preamble, it is not given to Wireshark or any other application. Most Ethernet interfaces also either don't supply the FCS to Wireshark or other applications, or aren't configured by their driver to do so; therefore, Wireshark will typically only be given the green fields, although on some platforms, with some interfaces, the FCS will be supplied on incoming packets.

Allowed Packet Lengths

Ethernet packets with less than the minimum 64 bytes for an Ethernet packet (header + user data + FCS) are padded to 64 bytes, which means that if there's less than 64-(14+4) = 46 bytes of user data, extra padding data is added to the packet.

 【注1】在wireshark中,捕捉到的ARP数据包的长度,很多时候是42bytes,有时候是60bytes。

这个长度取决于发送ARP Request端的操作系统的ARP包编码方式【是否在ARP数据包末端添加18个0x00的padding】

【注2】有的TCP或UDP数据包的长度也可能小于60bytes。

  

二、原文网址[原文发布于2014-09-23 22:44]

http://www.cnblogs.com/tom-and-jerry/p/3988109.html

 

【完结】


wireshark抓包,数据包的长度大都在40-79之间为何?

一些机器正常运行时候的包,估计没干啥活。随便打开一个网页就会有较大的包出现。
如果有上网,看碟或者聊天,包还很小,就是你截包选择的网卡不对,没选中你正在使用的网卡。换到正在用的网卡上就可以了
 

wireshark怎抓取别人电脑的数据包

抓取别人的数据包有几种办法,第一种是你和别人共同使用的那个交换机有镜像端口的功能,这样你就可以把交换机上任意一个人的数据端口做镜像,然后你在镜像端口上插根网线连到你的网卡上,你就可以抓取别人的数据了;第二种,把你们局域网的交换机换成一个集线器,这样的换所有的数据包都是通发的,也就是说,不管是谁的数据包都会路过这个集线器上的每一个计算机,只要你将网卡设置为混杂模式就能抓到别人的包;第三种,利用MAC地址欺骗,在局域网内发送ARP包,使其他计算机都误以为你是网关,这样的话,其他计算机都会将它们的数据包发送到你这里,你就可以抓到它们的包了,不过如果你用这种方法,建议还是自己写个程序比较好,现在很多无良工具都是截获别人的数据请求不转发,最好转发一下,这样其它计算机就不会发现你在做MAC欺骗了;第四种,如果你们是共用一个ADSL猫上网的话,有条件的情况下,你还可以给自己的电脑安装两个网卡,一个网卡接猫,一个接交换机,然后把接猫的网卡共享,这里接猫的网卡的IP设置为192.168.1.1,让这个网卡做网关,别的电脑都通过这个网卡上网,所以你可以轻易的在这个网卡上捕获别的电脑的数据包。上述四种方法仅作为技术研究在此讨论。
 

相关内容