[e2e] TCP fragmentation and reassembly

David Borman david.borman at windriver.com
Wed Dec 7 10:45:48 PST 2005


TCP does not do fragmentation and reassembly.  IP does fragmentation  
and reassembly.  On the sending side, TCP takes a byte stream from  
the application, and sends it as a series of complete TCP/IP  
packets.  On the receive side, TCP will do resequencing of packets if  
they arrive out of order, so that they are presented to the receiving  
application in the same order that they were sent.

The TCP MSS value specifies the largest size of packet that the  
receiver can reassemble.  I doubt that there are many, if any, TCP  
implementations that can't handle receiving a full 64K TCP/IP packet  
(as a series of IP fragments).  But since most TCP implementations  
try very hard to not send packets that will be fragmented at the IP  
layer, as long as the MSS is larger than the underlying MTU it  
doesn't really matter.  In theory, when using Path MTU discovery,  
there is no reason to not always use the maximum MSS value of 64K-1.

			-David Borman

On Dec 5, 2005, at 4:45 PM, Erwin Davis wrote:

> Helllo,
>
> Packet from application layer may be framed in TCP layer based on  
> MSS (maximum segment size, not MTU in IP layer) negotiated between  
> two TCP layers of the end parties. My question is if the TCP layer  
> in receiving side will reassemble the TCP fragments before it  
> forward the packet to the application layer. If yes, then how the  
> TCP layer in receiving side knows how many TCP fragments are made  
> up for this one application packet. If not, will it require the  
> intelligence from the application layer for the application packet  
> reassembly. Thanks for your help,
>
> erwin



More information about the end2end-interest mailing list