tcpsystemmss

Is MSS value fixed in SYN packet?


I wonder how MSS is set in SYN packet? Is it a fixed value in one operating system or the value could be changed in the same operating system? I know that the value is different in different operating systems. Also is the MSS value in SYN related to hardware configuration? Thanks.


Solution

  • RFC 879 describes how MSS is used and specified.

    In short, MSS is specified during TCP handshake via SYN packet. However, this value can later be changed by OS itself or by setting a protocol option.

    You can set option TCP_MAXSEG via setsockopt.