Maximum segment size

From Wikipedia, the free encyclopedia - View original article

Jump to: navigation, search

The maximum segment size (MSS) is a parameter of the TCP protocol that specifies the largest amount of data, specified in octets, that a computer or communications device can receive in a single TCP segment. It does not count the TCP header or the IP header.[1] The IP datagram containing a TCP segment may be self-contained within a single packet, or it may be reconstructed from several fragmented pieces; either way, the MSS limit applies to the total amount of data contained in the final, reconstructed TCP segment.

The maximum segment size to avoid fragmentation is equal to the largest datagram size that any host is required to be able to reassemble minus the IP header size and TCP header sizes.[2] Therefore IPv4 hosts are required to be able to handle an MSS of 536 octets (= 576[3] - 20 - 20) and IPv6 hosts are required to be able to handle an MSS of 1220 octets (= 1280[4] - 40 - 20).

A lower MSS will ensure that fragmentation will never occur along the path but will result in higher overhead.[5]

For most computer users, the MSS option is established by the operating system on the SYN packet during the TCP handshake. Each direction of data flow can use a different MSS.

Further reading[edit]

See also[edit]


  1. ^ RFC 879, page 2, Section 3, "The MSS counts only data octets in the segment, it does not count the TCP header or the IP header."
  2. ^ RFC 2460, page 28, Section 8.3
  3. ^ RFC 879, page 1, Section 1
  4. ^ RFC 2460, page 24, Section 5
  5. ^ The TCP/IP Guide, TCP Maximum Segment Size (MSS) and Relationship to IP Datagram Size