通过以太网发送的纯 TCP Ack 的总长度是多少?

发布于 2024-10-30 07:37:59 字数 616 浏览 12 评论 0原文

我使用 Microsoft 网络监视器捕获了纯 TCP 确认。它显示捕获的帧长度为 54 字节。 IP 标头(20 字节)+ TCP 标头(20 字节)+ Src MAC(6 字节)+ Dst MAC(6 字节)+ 帧类型(2 字节)。我没有看到 CRC(4 字节)字段。我知道以太网的最小帧长度是 64 字节 (46 + 18),最大帧长度是 1518。为什么我在网络监视器中看不到这一点?以太网帧的数据字段的值为46-1500。 IP 数据帧是否在 6 个八位字节中用零填充以使总帧长度为 46?

找到答案:通过网络发送的数据包的数据字段的最小长度 以太网是 46 个八位位组。如有必要,应填充数据字段 (八位字节为零)以满足以太网最小帧大小。这 填充不是 IP 数据包的一部分,也不包含在总数中 IP 标头的长度字段。 http://www.ietf.org/rfc/rfc0894.txt

IEEE 802.11 中帧的最小开销是多少?最大和最小帧尺寸是多少?通过 WiFi 的纯 TCP Ack 的帧大小是多少?

我也会接受部分答案

I have captured a pure TCP ack using Microsoft Network Monitor. It shows the captured frame length as 54 bytes. IP header (20 bytes) + TCP Header (20 bytes) + Src MAC (6 bytes) + Dst MAC (6 bytes) + Frame Type (2 bytes). I don't see a CRC (4 byte) field. I know the minimum frame length for Ethernet is 64 bytes (46 + 18) and the maximum is 1518. Why don't I see this in Network Monitor? The value of the data field for Ethernet frame is 46-1500. Is the IP dataframe padded with zeros in 6 octets to make the total frame length 46?

Found Answer: The minimum length of the data field of a packet sent over an
Ethernet is 46 octets. If necessary, the data field should be padded
(with octets of zero) to meet the Ethernet minimum frame size. This
padding is not part of the IP packet and is not included in the total
length field of the IP header. http://www.ietf.org/rfc/rfc0894.txt

What is minimum overhead for a frame in IEEE 802.11. What is the maximum and minimum frame size there? What will be the frame size of a pure TCP Ack over WiFi?

I will also accept partial answers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情深如许 2024-11-06 07:37:59

Wireshark 在常见问题解答 7.10 中回答了您的问题。

大多数操作系统支持捕获以太网上帧的 FCS,并且可能在大多数其他链路层类型上也不支持。某些操作系统上的某些驱动程序确实支持它,例如 NetBSD 上的某些(全部?)以太网驱动程序,以及 Mac OS X 中 Apple 千兆位以太网接口的驱动程序。在这些操作系统中,您可能始终会获得 FCS,或者只有在混杂模式下捕获时才可能获得 FCS(您必须确定是哪种情况)。


IEEE 标准 802.11 第 60 页:

框架主体字段的大小是可变的。最大帧主体大小由最大 MSDU 大小(2304 个八位字节)加上安全封装的任何开销决定。

在此处输入图像描述

Wireshark answers your question in FAQ 7.10.

Most OSes do not support capturing the FCS of a frame on Ethernet, and probably do not support it on most other link-layer types. Some drivers on some OSes do support it, such as some (all?) Ethernet drivers on NetBSD and possibly the driver for Apple's gigabit Ethernet interface in Mac OS X; in those OSes, you might always get the FCS, or you might only get the FCS if you capture in promiscuous mode (you'd have to determine which is the case).


IEEE Std 802.11 Page 60:

The Frame Body field is of variable size. The maximum frame body size is determined by the maximum MSDU size (2304 octets) plus any overhead from security encapsulation.

enter image description here

鸵鸟症 2024-11-06 07:37:59

首先,比较普通的以太网和 wifi 标头几乎是苹果和橘子的比较……wifi 帧有多种选项可以扩展 802.11 帧的大小,在某些罕见的情况下,wifi 帧开销单独可能是 74 字节。此外,wifi 帧的有效负载允许为 0 字节,这与需要至少 46 字节有效负载的以太网 II 封装不同。

因此,为了给您提供带有 TCP ACK 的预期 wifi 大小的可靠数字...

30-bytes (wifi ethernet hdr)
20-bytes (IP Header)
20-bytes (TCP Header)
 4-bytes (MIC, if WPA)
 4-bytes (CRC)
------------------------
 > 74 bytes

802.11 帧(包括标头)的最大大小为 2346 字节。

First, comparing normal ethernet and wifi headers is almost an apples and oranges comparison... the wifi frame has a variety of options that could expand the size of the 802.11 frame, and in some rare circumstances the wifi framing overhead alone could be 74 bytes. Also, the payload of a wifi frame is allowed to be 0 bytes, unlike the Ethernet II encapsulation which requires at least 46 bytes of payload.

So, to give you solid numbers for the expected wifi size with a TCP ACK...

30-bytes (wifi ethernet hdr)
20-bytes (IP Header)
20-bytes (TCP Header)
 4-bytes (MIC, if WPA)
 4-bytes (CRC)
------------------------
 > 74 bytes

The maximum size of an 802.11 frame (including headers) is 2346 bytes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文