First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Is TCP MSS a value both communication peers agreed up?

  • retag add tags

Hi,

I now that TCP MSS (max segment size) value is telling the peer "I can receive xxx bytes of data". I am wondering if both side will agree upon a min value or each side can use their own claimed size. For example, if A says I can receive 1460 Bytes while B said I can do 1200 Bytes. Will 1200 be picked up as the max MSS size on this tcp session? or A can only send max to 1200 bytes to B, while B can send max of 1460 Bytes of data to A?

Thanks! -Steve

SteveZhou's avatar
201
SteveZhou
asked 2020-05-06 07:28:57 +0000
edit flag offensive 0 remove flag close merge delete

Comments

No. My understanding is that the smallest will be used because it may not be the host actually contributing to the smaller size. It could be an indication of network capability.

smacznego's avatar smacznego (2020-05-06 14:18:55 +0000) edit
add a comment see more comments

2 Answers

1

Well, it is more like an announced limitation. See below for more details of this topic, because it needs a small dive to answers this question. TCP MSS anouncing

Christian_R's avatar
2.1k
Christian_R
answered 2020-05-10 21:19:38 +0000
edit flag offensive 0 remove flag delete link

Comments

nice article, have added to my reading list. thank you !

SteveZhou's avatar SteveZhou (2020-05-26 02:50:33 +0000) edit
add a comment see more comments
0

The TCP MSS value is advertised to the peer, it is not negotiated.

When the MSS is not adjusted along the path by an intermediate device, this will result in both sides using the same maximum size for segments. That's because the host that sends the smallest MSS is not capable of sending larger segments and the host receiving the smallest MSS will adjust to the MSS it received.

When the MSS does get adjusted by an intermediate device, then things can go wrong if there is asymmetric routing and the two paths have a different MTU (or tunneling overhead). This is because the MSS being received will be used to send data over the other link. You can solve this by making sure the MSS gets adjusted to the lowest value in both paths of the traffic.

Here is an example of things going wrong with asymmetric routing and MSS adjustments:

  • Host A sends a MSS of 1460
  • The traffic follows path X in which there is a link with an MTU of 1420, so the MSS is adjusted to 1380
  • Host B receives the MSS of 1380
  • Host B sends a MSS of 1460
  • The traffic follows path Y in which there is a link with an MTU of 1400, so the MSS is adjusted to 1360
  • Host A receives the MSS of 1360
  • When host A sends a full-size-segment, it uses the MSS of 1360
  • The packet takes route X and can be sent without fragmentation (1360 is less than 1380)
  • When host B sends a full-size-segment, it uses the MSS of 1380
  • The packet takes route Y and can not be sent without fragmentation (1380 is greater than 1360)
  • If any device in path X changes the MSS to 1360, then host B will also use segment of max 1360 bytes
SYN-bit's avatar
18.5k
SYN-bit
answered 2020-05-11 21:29:56 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer