Lably
Skip to content

Maximum segment size

Transmission Control Protocol parameter

  • 3 min read
  • 3 chapters

Related on Lably

Through Operating system

To avoid fragmentation in the IP layer, a host must specify the maximum segment size as equal to the largest IP datagram that the host can handle minus the IP and TCP header sizes. Though there is no minimum required MSS defined in IETF RFCs, there is a minimum MTU, and so a default MSS is calculated by subtracting the minimum IP and TCP header sizes from the MTU. For example, IPv4 hosts typically default to an MSS of 536 octets (= 576 − 20 − 20) and IPv6 hosts generally are able to handle an MSS of 1220 octets (= 1280 − 40 − 20).

Small MSS values will reduce or eliminate IP fragmentation but will result in higher overhead.

Each direction of data flow can use a different MSS.

For most computer users, the MSS option is established by the operating system.

TCP options size (Variable 0–320 bits, in units of 32 bits) must be deducted from MSS size if TCP options are enabled. For example, TCP Time Stamps are enabled by default on Linux platforms.

Default value

The default TCP Maximum Segment Size for IPv4 is 536. For IPv6 it is 1220. Where a host wishes to set the maximum segment size to a value other than the default, the maximum segment size is specified as a TCP option, initially in the TCP SYN packet during the TCP handshake. The value cannot be changed after the connection is established.

Sign in to keep reading

2 more chapters are free with a Lably account.

More in Computing and communication