Minimal TCP/IP overhead (over Ethernet frames) [closed]

不打扰是莪最后的温柔 提交于 2019-12-23 13:00:09

问题


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

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.

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.


回答1:


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.

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.



来源:https://stackoverflow.com/questions/8902583/minimal-tcp-ip-overhead-over-ethernet-frames

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!