When tcp_window_scaling is set, what is the relationship among MTU, MSS and Window size

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 6
  • Red Hat Enterprise Linux (RHEL) 5
  • Red Hat Enterprise Linux (RHEL) 4

Issue

  • When tcp_window_scaling is set, what is the relationship among MTU, MSS and Window size?

Resolution

In a connection between a client and a server, the client tells the server the number of bytes it is willing to receive at one time from the server; this is the client's receive window, which becomes the server's send window.

Likewise, the server tells the client how many bytes of data it is willing to take from the client at one time; this is the server's receive window and the client's send window.

The simplest way of considering the window size is that it indicates the size of the device's receive buffer for the particular connection.

That is, window size represents how much data a device can handle from its peer at one time before it is passed to the application process.

TCP segments are the messages that carry data between TCP devices.

A primary determinant of how much data to send in a segment is the current status of the sliding window mechanism on the part of the receiver.

When Device A receives a TCP segment from Device B, it examines value of the Window field to know the limit on how much data Device B is allowing Device A to send in its next segment.

In addition to the dictates of the current window size, each TCP device also has associated with it a ceiling; on TCP size—a segment size that will never be exceeded regardless of how large the current window is. This is called the maximum segment size (MSS).

TCP segments will be packaged into IP datagrams. IP datagrams have their own size limit issues: the matter of the maximum transmission unit (MTU) of an underlying network.

If a TCP segment is too large, it will lead to an IP datagram is too large to be sent without fragmentation.

Fragmentation reduces efficiency and increases the chances of part of a TCP segment being lost, resulting in the entire segment needing to be retransmitted.

The TCP maximum segment size (MSS) specifies the maximum number of bytes in the TCP segment’s Data field, regardless of any other factors that influence segment size.

The default MSS for TCP is 512, which results from taking the minimum IP MTU of 552 and subtracting 20 bytes each for the IP and TCP headers.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.