[e2e] TCP fragmentation and reassembly

David Borman david.borman at windriver.com
Thu Dec 8 10:33:40 PST 2005


On Dec 7, 2005, at 6:56 PM, Joe Touch wrote:

> David Borman wrote:
>>
>> On Dec 7, 2005, at 2:22 PM, Joe Touch wrote:
>>
>>>> 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).
>>>
>>> See: http://www.psc.edu/networking/projects/tcptune/
>>>
>>> The table (grep for "FreeBSD") shows that current OS's start with a
>>> default socket size smaller than 64KB (which limits the size of the
>>> receive window, right?).
>>
>> Yes, but that has nothing to do with the MSS value.  The MSS is   
>> simply
>> the largest IP packet that the host can reassemble.
>
> According to RFC793, MSS is the max TCP segment the receiver can  
> handle
> - - not just the largest IP packet that can be reassembled (though  
> this
> could be presumed as a prerequisite). If the connection can only  
> handle
> 8KB outstanding, even if IP can handle a packet that large, TCP  
> cannot,
> so it seems inappropriate to ever advertise an MSS > max_recv_window,
> which is bounded by the socket size.

No.  The receive window has no influence on the MSS value.  Look at  
RFC 1122.  The value to use in the MSS option is to be less than or  
equal to MMS_R - 20, where MMS_R is "the maximum message size that  
can be received and reassembled in an IP datagram" (RFC 1122, pg  
57).  When you actually go to send a packet, the received MSS value  
is only one of several things that can limit the packet size.

...
>> For this reason, some  systems use an MSS
>> that is based on the maximum MTU of all  interfaces, rather than the
>> outgoing interface.
>
> The advertised MSS can be that large, but it presumes that all
> interfaces are capable of receiving and reassembling IP packets  
> equally
> well, which is not the case where reassembly happens on the NIC. The
> advertised MSS sbould be bounded by the incoming interface MTU of this
> connection.

Provided you know for sure which is the incoming interface.  You can  
always know what interface you are using to send packets, but in many  
multi-homed situations you can't guarantee on which interface the  
traffic will arrive.

		-David Borman


More information about the end2end-interest mailing list