The maximum segment size (MSS) is a measure used in TCP protocol to define the largest allowable packet size to be sent across the network. Independent MSS measures can be used on either side of data transmission and, in some cases, may represent significantly different values.
MSS is a measure of data in the transmitted segment and not the information contained in either the TCP or Internet Protocol (IP) header.
Per RFC879‘s specs; the default MSS to be used in TCP transmissions is calculated (in octets) by the following formula:
This specification was defined before IPV6 and, as one might expect, has been adapted by RFC2460 to accommodate the longer denotation used by the more modern protocol by using the following formula:
The MSS value is used during the transmission of data and not during initial connection negotiation, such as the TCP 3-Way Handshake. As noted by RFC 879:
The MSS value counts only data octets, thus it does not count the TCP SYN and FIN control bits even though SYN and FIN do consume TCP sequence numbers
The MSS is a dynamic variable that is rapidly increased during the Slow Start state of TCP’s congestion control algorithm. This is essentially the process by which a TCP application determines available network bandwidth.