4

This doubt has been bugging me for a while now.

Upon reading numerous articles i have found that the client and the server exchange their mss value during the tcp 3 way handshake and the lower of the two values is selected as the mss for the connection. Since both client and server are using the same mss value isn't this negotiation?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 14 '17 at 22:45
6

It is NOT considered a negotiation, it is a statement of an known maximum, and there is not back and forth. It can be different bidirectionally. So one TCP flow can have a different MSS each way.

RFC 879 states:

HOSTS MUST NOT SEND DATAGRAMS LARGER THAN 576 OCTETS UNLESS THEY HAVE SPECIFIC KNOWLEDGE THAT THE DESTINATION HOST IS PREPARED TO ACCEPT LARGER D ATAGRAMS.

thus:

THE TCP MAXIMUM SEGMENT SIZE IS THE IP MAXIMUM DATAGRAM SIZE MINUS FORTY.

The default IP Maximum Datagram Size is 576.

The default TCP Maximum Segment Size is 536.

And continuing:

TCP provides an option that may be used at the time a connection is established (only) to indicate the maximum size TCP segment that can be accepted on that connection. This Maximum Segment Size (MSS) announcement (often mistakenly called a negotiation) is sent from the data receiver to the data sender and says "I can accept TCP segments up to size X". The size (X) may be larger or smaller than the default. The MSS can be used completely independently in each direction of data flow. The result may be quite different maximum sizes in the two directions.

You can find a lot more information on MSS in RFC 6691 and RFC 1122 section 4.2.2.6

  • Nice answer, this site needs more quality answers like this – Mike Pennington Feb 14 '17 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.