[forward] What's the minimum size of a TCP packet

// http://superuser.com/questions/243008/whats-the-minimum-size-of-a-tcp-packet

这里的图片不错,转一个

Lets assume you're sending 1 byte of data1 over the internet, on the TCP/IP model.

The data starts on the application level and needs to be wrapped up in headers for the lower levels so that it can be passed around.

First that data is wrapped in a TCP Segment, which adds a header of 20 bytes (min size now 21 bytes).
This puts us on the transport level.

This is then wrapped in an IP Packet, which adds another header of 20 bytes (min size now 41 bytes).
Now we're on internet level.
Note that this wrapping is changed each time a new router forwards your data to a new subnet.

This is wrapped in a link frame of some type - of which the header and footer size vary depending on the type of frame used, which depends on the type of link being used.
This is on link level.
This wrapping is changed each time the unit if transmitted between two entities.

Finally is the physical transmission (eg, electrical signals down a cable, radio waves, etc).

Here's some informative images available from the Wikipedia TCP/IP model page that hep to visually explain what is happening:




1. I guess you might be able to send 0 bytes... but haven't checked that. In fact I haven't checked if 1 byte is allowed either, but hey.

posted @ 2012-04-23 21:08  dtozg  阅读(351)  评论(0编辑  收藏  举报