Minimal TCP/IP overhead (over Ethernet frames)

ethernettcp

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.

Best Answer

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.