最小的TCP/IP开销(通过以太网帧) [英] Minimal TCP/IP overhead (over Ethernet frames)

查看:389
本文介绍了最小的TCP/IP开销(通过以太网帧)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以太网中最小的帧大小有多小? TCP和IP协议的开销是多少?

How small is the smallest frame size in Ethernet? What is the TCP and IP protocol overhead?

我想找出的是单字节TCP/IP流的使用带宽(一种方式,不包括ACK)的开销.我以为它在32到100字节附近,但实际上不是我的专业领域.

What I want to find out is the overhead of a single byte TCP/IP stream in terms of used bandwidth (one way, excluding the ACK). I assume it is in the vicinity of 32-100 bytes, but its really not my area of expertise.

编辑 我正在对Web服务器进行编程,我想为我的应用程序数据编程正确的大小,以便在程序中获得良好的吞吐量.为此,我想知道必须减少带宽的限制.

EDIT I'm programming a web server and I want to program the correct sizes for my application data so I get good throughput in my program. For this I want to know what limits I have to reduce bandwidth.

推荐答案

802.3标准将最小帧大小指定为依赖于实现.所有特定的,最流行的实现(高达并包括100Mbps,1Gbps和10Gbps)都将其设置为512位,等于64个八位位组.请记住,这包括标头(不包括前导和SFD,因此地址中包含12个字节,帧类型中包含2个字节)和尾部中的CRC(4个字节).因此,在传输最小尺寸的帧时,我们已经获得了46个字节的数据本身.

The 802.3 standard specifies the minimal frame size as implementation-dependent. All the specific, most popular implementations (up to and including 100Mbps, 1Gbps, and 10Gbps) have it set as 512 bits, which is equal to 64 octets. Keep in mind that this includes the header (not including the preamble and the SFD, so 12 bytes for the addresses and 2 bytes for the frame type) and the CRC (4 bytes) in the trailer. Therefore, while transmitting a frame with the minimal size, we've got 46 bytes for the data itself.

基本IPv4标头的长度为20个字节,TCPv4标头的长度也为20个字节.请记住,这两个标头都可以包含一个附加的可选"Options"字段,该字段可能会将它们放大(不过,我不知道实际上有哪个系统在执行此操作).这样一来,您就可以在最小尺寸的以太网帧中为真实数据留出6个字节.

The basic IPv4 header is 20 bytes long, and the TCPv4 header is 20 bytes as well. Keep in mind that both of these headers can include an additional optional "Options" field that may enlarge them (I don't know about any systems actually doing that, though). That leaves you 6 bytes for your real data inside a minimally-sized Ethernet frame.

这篇关于最小的TCP/IP开销(通过以太网帧)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆