
The TCP/IP Guide - Version 3.0 (Contents) ` 899 _ © 2001-2005 Charles M. Kozierok. All Rights Reserved.
deciding how much data to put into a segment, each device in the TCP connection will
choose the amount based on the current window size, in conjunction with the various
algorithms described in the reliability section, but it will never be so large that the amount of
data exceeds the MSS of the device to which it is sending.
Note: I need to point out that the name “maximum segment size” is in fact
misleading. The value actually refers to the maximum amount of data that a
segment can hold—it does not include the TCP headers. So if the MSS is 100, the
actual maximum segment size could be 120 (for a regular TCP header) or larger (if the
segment includes TCP options).
Maximum Segment Size Selection
The selection of the MSS is based on the need to balance various competing performance
and implementation issues in the transmission of data on TCP/IP networks. The main TCP
standard, RFC 793, doesn't discuss MSS very much, which opened the potential for
confusion on how the parameter should be used. RFC 879 was published a couple of years
after the TCP standard to clarify this parameter and the issues surrounding it. Some issues
with MSS are fairly mundane; for example, certain devices are limited in the amount of
space they have for buffers to hold TCP segments, and therefore may wish to limit segment
size to a relatively small value. In general, though, the MSS must be chosen by balancing
two competing performance issues:
☯ Overhead Management: The TCP header takes up 20 bytes of data (or more if
options are used); the IP header also uses 20 or more bytes. This means that between
them a minimum of 40 bytes are needed for headers, all of which is non-data
“overhead”. If we set the MSS too low, this results in very inefficient use of bandwidth.
For example, suppose we set it to 40; if we did, a maximum of 50% of each segment
could actually be data; the rest would just be headers. Many segment datagrams
would be even worse in terms of efficiency.
☯ IP Fragmentation: TCP segments will be packaged into IP datagrams. As we saw in
the section on IP, datagrams have their own size limit issues: the matter of the
maximum transmission unit (MTU) of an underlying network. If a TCP segment is too
large, it will lead to an IP datagram is too large to be sent without fragmentation.
Fragmentation reduces efficiency and increases the chances of part of a TCP segment
being lost, resulting in the entire segment needing to be retransmitted.
TCP Default Maximum Segment Size
The solution to these two competing issues was to establish a default MSS for TCP that
was as large as possible while avoiding fragmentation for most transmitted segments. This
was computed by starting with the minimum MTU for IP networks of 576. All networks are
required to be able to handle an IP datagram of this size without fragmenting. From this
number, we subtract 20 bytes for the TCP header and 20 for the IP header, leaving 536
bytes. This is the standard MSS for TCP.