# what determines the final windows scaling factor?

what determines the final windows scaling factor? example FTP client initiates a TCP connection and has a 1GIG interface. Window scaling is enabled. RTT is 76ms

in the original SYN packet it had:

MSS is 1460.
window size value: 65535,
window scale: 7 (multiply by 128).


SYN-ACK from opposite side:

MSS is 1260,
window size value: 8192,
window scale: 14 (multiply by 16384).


in final ACK it came to:

Window size value: 32768,
window size scaling factor: 128,
calculated window size: 4194304.


(for the rest of FTP transfer it stayed on this value: 4194304)

so 2 questions regarding initiating side (FTP client):

1. How at the end the window size reduced to 32768 on the initiating side?
2. Why if the interface is set to GIG - it did not use the 14 as window scale ? but used 7?what could have determined that - is it a hard setting on server or did the TCP connection catch some buffer on the network?

thanks for any help Nik

edit retag close merge delete

Sort by » oldest newest most voted

Hi,

The first thing to say is that the Windows Scaling Factor is only set by Option values in the SYN and SYN/ACK. You will see this in the TCP header of every packet simply because Wireshark is remembering the value for you and presenting it. You can tell that the value in the header is generated by Wireshark because it is enclosed in square brackets. All values in square brackets are generated fields rather than fields in the protocol.

Scaling factor shows the number of leftward bit shifts that should be used for an advertised window size. The affect is multiplication; an 8 bit shift being equivalent to a multiplication factor of 256. Therefore, for the server to determine the size of the client-side receive window, it should multiply the advertised size by 256.

Your trace shows that for data flowing from the server to the client, a scaling factor of 8 is applied to windows advertised by the client, and a scaling factor of 14 is applied to windows advertised by the server.

For part 2 of your question, I think you are muddling scaling factor with advertised window size. Scaling factor just tells the sender how to calculate the effective window size. The actual size can be any value from 0 up to 64k x the scaling factor.

What are the operating systems of the client and server?

Best regards...Paul

PS: Sorry for the length of this response. If I had more time I'd have made it shorter.

more

Thanks Paul.

starting with 2) I understand that the scaling factor of 8 (or 7) is applied to client window and that of 14 is applied server window. Question is: what determines that scaling factor? what is it based on? why not both sides have the 14-bit scaling factor multiplication, since both have 1Gig ports?

i dont have exact operating system info, but i know its windows for both client and server

thanks for any help

( 2017-12-06 16:43:55 +0000 )edit

The scaling factor is related to the OS settings and not to the port speed. The RFC related to the window scaling is the 1323 one and you can see examples for WinXP that was not supporting it but later on with registry modifications it was supported. What also you should have in mind is that devices like proxies can modify the value of the scaling and window size. Best Regards, Yiannis

( 2018-06-05 18:55:05 +0000 )edit

Yiannis,

I feel like it has to be more that just the OS that decides the scaling factor. I do a Iperf test and my receiver has a scaling factor of 2 I do a online speed test and my receiver is 256 (same receiver both times) Why would they be different numbers?

Ps i am have throughput issues. Not trying to take over the conversation.

( 2018-07-13 18:58:23 +0000 )edit