“When the consumer sends a SYN packet to the server, the SYN/ack server replies with its MSS.” Not essentially. MSS is a TCP possibility, and it will probably solely seem within the SYN phase. “If an MSS Choice just isn’t obtained at connection setup, TCP implementations MUST assume a default ship MSS of 536 (576 – 40) for IPv4 or 1220 (1280 – 60) for IPv6 (MUST-15).“
MSS could also be associated to the MTU, however it’s based mostly on the fragmentation reassembly buffer of the host sending the MSS, and that would definitely be associated to the MTU, however not essentially. For instance, a bunch with an MTU of 1500 might have a bigger MSS as a result of the host sending to it might then ship a phase that causes IP to fragment its packet to suit its personal MTU, and the receiver might then reassemble the packet, passing a phase bigger than the MTU to TCP.
The router adjustment for MSS is used when you have got, for instance, a tunnel with a smaller MTU, and also you need to make it possible for a phase can’t overrun on the opposite finish. In that case, the router will alter the MSS within the SYN it sees to be what you have got configured for the MSS. Keep in mind that the biggest transmission dimension permitted by the IP layer is 65536 – any overhead (40 for IPv4 and 20 for IPv6 because the largest IPv6 payload dimension just isn’t decreased by the IPv6 header).
The utmost dimension of a phase {that a} TCP endpoint actually sends, the
“efficient ship MSS”, MUST be the smaller (MUST-16) of the ship MSS
(that displays the accessible reassembly buffer dimension on the distant
host, the EMTU_R [19]) and the biggest transmission dimension permitted by
the IP layer (EMTU_S [19]):Eff.snd.MSS = min(SendMSS+20, MMS_S) – TCPhdrsize – IPoptionsize
With out utilizing the adjustment, every finish of the connection might set its personal MSS within the connection handshake, or not use that possibility, and the smallest wins. With the adjustment, it will get set to what you configure it to be.
That is described in RFC 9293, Transmission Management Protocol (TCP)
If this selection is current, then it communicates the utmost obtain
phase dimension on the TCP endpoint that sends this phase. This worth
is proscribed by the IP reassembly restrict. This subject could also be despatched within the
preliminary connection request (i.e., in segments with the SYN management bit
set) and MUST NOT be despatched in different segments (MUST-65). If this selection
just isn’t used, any phase dimension is allowed. A extra full description
of this selection is supplied in Part 3.7.1.