Ask Your Question
0

Is TCP MSS a value both communication peers agreed up?

asked 2020-05-06 07:28:57 +0000

SteveZhou gravatar image

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

edit retag flag offensive 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 gravatar imagesmacznego ( 2020-05-06 14:18:55 +0000 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2020-05-11 21:29:56 +0000

SYN-bit gravatar image

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
edit flag offensive delete link more
1

answered 2020-05-10 21:19:38 +0000

Christian_R gravatar image

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

edit flag offensive delete link more

Comments

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

SteveZhou gravatar imageSteveZhou ( 2020-05-26 02:50:33 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-05-06 07:28:57 +0000

Seen: 2,585 times

Last updated: May 11 '20