A
A
Asparagales2019-01-25 16:28:26
Computer networks
Asparagales, 2019-01-25 16:28:26

What is MSS (Maximum segment size), how is it calculated, what is it equal to and how to change it?

Wikipedia states:

MSS (Maximum segment size) is a TCP protocol parameter and determines the maximum size of a useful data block in bytes for a TCP packet (segment). Therefore, this setting does not take into account the length of the TCP and IP headers.
So the maximum MSS size = MTU - IP header size - TCP header size.
So each host requires availability for MSS:
IPv4 - last 536 octets (= 576 - 20 - 20)
IPv6 - last 1220 octets (= 1280 - 40 - 20).

The instructions from the website of one of the network equipment manufacturers say that:
MSS does not take into account the length of the ICMP and IP headers. And thus, MSS = MTU - (IP header + ICMP header) = 1500 - (20 + 8) = 1472

Here it says:
Suppose MTU is 1500 bytes, subtract 20 bytes of IPv4 address and 20 more bytes of TCP from it and we get MSS 1460 bytes. IPv6 with its extended header would leave only 1440 bytes for the MSS.

I still do not understand what needs to be subtracted from what and what the MSS value is equal to in the end. And maybe someone else knows how to change it in Windows or Linux?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Syomov, 2019-01-25
@kotomyava

MSS is the size of data, without headers, that can be sent over TCP without fragmentation.
The MSS is set automatically, usually based on the MTU. You don't need to change it. Sometimes you need to change the MTU, for example, when using tunnel protocols.
The MTU limit is often ethernet frame size 1526b as the most common transmission medium, and then we go up the OSI model, we add headers, and it decreases at each level.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question