ArticleslgStudy

science

Maximum segment size

Maximum segment size is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Maximum segment size rather than just read about it. In short: The maximum segment size (MSS) is a parameter of the Options field of the TCP header that specifies the largest amount of data, specified in bytes, that a computer or communications device can receive in a single TCP segment. It does not count the TCP header or the IP header (unlike, for example, the MTU for IP datagrams).

Key takeaways

  • Maximum segment size belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Maximum segment size to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Maximum segment size from memory before moving on to harder problems.

Reference excerpt

The maximum segment size (MSS) is a parameter of the Options field of the TCP header that specifies the largest amount of data, specified in bytes, that a computer or communications device can receive in a single TCP segment. It does not count the TCP header or the IP header (unlike, for example, the MTU for IP datagrams). 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. 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.

Inter-layer communication In order to notify MSS to the other end, an inter-layer communication is done as follows:

The Network Driver (ND) or interface should know the Maximum transmission unit (MTU) of the directly attached network. The IP should ask the Network Driver for the Maximum Transmission Unit. The TCP should ask the IP for the Maximum Datagram Data Size (MDDS). This is the MTU minus the IP header length (MDDS = MTU − IPHdrLen). When opening a connection, TCP can send an MSS option with the value equal to: MDDS − TCPHdrLen. In other words, the MSS value to send is: MSS = MTU − TCPHdrLen − IPHdrLen While sending TCP segments to the other end, an inter-layer communication is done as follows:

TCP should determine the Maximum Segment Data Size (MSDS) from either the default or the received value of the MSS option. TCP should determine if source fragmentation is possible (by asking the IP) and desirable. If so, TCP may hand to IP, segments (including the TCP header) up to MSDS + TCPHdrLen. If not, TCP may hand to IP, segments (including the TCP header) up to the lesser of (MSDS + TCPHdrLen) and MDDS. IP checks the length of data passed to it by TCP. If the length is less than or equal MDDS, IP attaches the IP header and hands it to the ND. Otherwise, the IP must do source fragmentation.

MSS and MTU MSS is sometimes conflated with MTU/PMTU, which is a characteristic of the underlying link layer, while MSS applies specifically to TCP and hence the transport layer. The two are similar in that they limit the maximum size of the payload carried by their respective protocol data unit (frame for MTU, TCP segment for MSS), and related since MSS cannot exceed the MTU for its underlying link (taking into account the overhead of any headers added by the layers below TCP). However, the difference, in addition to applying to different layers, is that (1) MSS can have a different value in either direction and that (2) frames exceeding the MTU may cause packets (which encapsulate segments) to be fragmented by the network layer, while segments exceeding the MSS are simply discarded.

Further reading Comer, Douglas E. (2006). Internetworking with TCP/IP. Vol. 1 (5/E ed.). Upper Saddle River, NJ, USA: Prentice Hall. Kozierok, Charles M. (2005-09-20). The TCP/IP Guide (3.0 ed.). Retrieved 2011-09-08.

See also Path MTU Discovery

References

Worked examples

Example 1 — a first encounter with Maximum segment size

Start with the simplest possible case. Write down what Maximum segment size claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Maximum segment size before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Maximum segment size ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Maximum segment size

In research
Maximum segment size appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Maximum segment size in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Maximum segment size is common in secondary-school and first-year university syllabi. It links to neighbouring topics Packets (information technology), Transmission Control Protocol, so understanding it makes those chapters shorter.
In everyday life
Look for Maximum segment size outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Maximum segment size” →

How to study Maximum segment size in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Maximum segment size means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Maximum segment size out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Maximum segment size in simple terms?

The maximum segment size (MSS) is a parameter of the Options field of the TCP header that specifies the largest amount of data, specified in bytes, that a computer or communications device can receive in a single TCP segment. It does not count the TCP header or the IP header (unlike, for example, t…

Why does Maximum segment size matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Maximum segment size?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Maximum segment size.

Tags

  • Packets (information technology)
  • Transmission Control Protocol

Keep exploring