The TCP Maximum Segment Size and Related Topics
RFC 879

Document Type RFC - Historic (November 1983; Errata)
Obsoleted by RFC 7805
Updated by RFC 6691
Last updated 2016-04-08
Stream Legacy
Formats plain text pdf html bibtex
Stream Legacy state (None)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state RFC 879 (Historic)
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                          J. Postel
Request for Comments: 879                                            ISI
                                                           November 1983

                      The TCP Maximum Segment Size
                           and Related Topics

This memo discusses the TCP Maximum Segment Size Option and related
topics.  The purposes is to clarify some aspects of TCP and its
interaction with IP.  This memo is a clarification to the TCP
specification, and contains information that may be considered as
"advice to implementers".

1.  Introduction

   This memo discusses the TCP Maximum Segment Size and its relation to
   the IP Maximum Datagram Size.  TCP is specified in reference [1].  IP
   is specified in references [2,3].

   This discussion is necessary because the current specification of
   this TCP option is ambiguous.

   Much of the difficulty with understanding these sizes and their
   relationship has been due to the variable size of the IP and TCP
   headers.

   There have been some assumptions made about using other than the
   default size for datagrams with some unfortunate results.

      HOSTS MUST NOT SEND DATAGRAMS LARGER THAN 576 OCTETS UNLESS THEY
      HAVE SPECIFIC KNOWLEDGE THAT THE DESTINATION HOST IS PREPARED TO
      ACCEPT LARGER DATAGRAMS.

         This is a long established rule.

   To resolve the ambiguity in the TCP Maximum Segment Size option
   definition the following rule is established:

      THE TCP MAXIMUM SEGMENT SIZE IS THE IP MAXIMUM DATAGRAM SIZE MINUS
      FORTY.

         The default IP Maximum Datagram Size is 576.
         The default TCP Maximum Segment Size is 536.

Postel                                                          [Page 1]



RFC 879                                                    November 1983
TCP Maximum Segment Size                                                

2.  The IP Maximum Datagram Size

   Hosts are not required to reassemble infinitely large IP datagrams.
   The maximum size datagram that all hosts are required to accept or
   reassemble from fragments is 576 octets.  The maximum size reassembly
   buffer every host must have is 576 octets.  Hosts are allowed to
   accept larger datagrams and assemble fragments into larger datagrams,
   hosts may have buffers as large as they please.

   Hosts must not send datagrams larger than 576 octets unless they have
   specific knowledge that the destination host is prepared to accept
   larger datagrams.

3.  The TCP Maximum Segment Size Option

   TCP provides an option that may be used at the time a connection is
   established (only) to indicate the maximum size TCP segment that can
   be accepted on that connection.  This Maximum Segment Size (MSS)
   announcement (often mistakenly called a negotiation) is sent from the
   data receiver to the data sender and says "I can accept TCP segments
   up to size X". The size (X) may be larger or smaller than the
   default.  The MSS can be used completely independently in each
   direction of data flow.  The result may be quite different maximum
   sizes in the two directions.

   The MSS counts only data octets in the segment, it does not count the
   TCP header or the IP header.

   A footnote:  The MSS value counts only data octets, thus it does not
   count the TCP SYN and FIN control bits even though SYN and FIN do
   consume TCP sequence numbers.

4.  The Relationship of TCP Segments and IP Datagrams

   TCP segment are transmitted as the data in IP datagrams.  The
   correspondence between TCP segments and IP datagrams must be one to
   one.  This is because TCP expects to find exactly one complete TCP
   segment in each block of data turned over to it by IP, and IP must
   turn over a block of data for each datagram received (or completely
   reassembled).

Postel                                                          [Page 2]



RFC 879                                                    November 1983
TCP Maximum Segment Size                                                

5.  Layering and Modularity

   TCP is an end to end reliable data stream protocol with error
   control, flow control, etc.  TCP remembers many things about the
   state of a connection.

   IP is a one shot datagram protocol.  IP has no memory of the
   datagrams transmitted.  It is not appropriate for IP to keep any
   information about the maximum datagram size a particular destination
   host might be capable of accepting.

   TCP and IP are distinct layers in the protocol architecture, and are
   often implemented in distinct program modules.

   Some people seem to think that there must be no communication between
   protocol layers or program modules.  There must be communication
   between layers and modules, but it should be carefully specified and
   controlled.  One problem in understanding the correct view of
   communication between protocol layers or program modules in general,
Show full document text