6

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?

0

2 Answers 2

13

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

1
  • Nice answer, this site needs more quality answers like this Feb 14, 2017 at 15:36
0

You cannot call it a negotiation because each side STATES the MSS it can accept. This value, is the lowest of values between the tcp buffer and the egress interface mtu size. Once a host knows its MSS and the far end host's MSS, he will choose the lowest one. Thus, in essence, both hosts will send data with the same MSS.

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.