Jan 26th

Windows 7 Auto-Tune == Random disconnects

By roy_hoover@iu13.org

Windows 7 auto-tune function in the IP stack breaks RDP connections. It took me two months to come to that conclusion, maybe this story will save you the same hassle.

It all started innocently enough. A school district joined the IU 13 WAN and suddenly some of their users began getting disconnected at random times from a remote server. This server at another IU was hosting an application that users accessed via RDP (Remote Desktop Protocol) from their desktop and laptop computers.

The problem began as soon as they connected to the IU 13 WAN. So clearly it was a network problem, except that not all users in this district experienced it and if they took their laptop home it worked just fine there. The problem is that there were others already using the application successfully on the WAN for some time. So maybe it wasn't a network problem.

First we tried a computer connected directly to the WAN hand-off switch at the district. This would eliminate the district network as the culprit. Users from there get disconnected too. Next we tried to find a pattern of users experiencing the problem. Each user had their own RDP account and only some users had the problem so it seemed like a good step. We had a user who had the problem and one who did not, swap RDP accounts. The problem stayed with the user. 

It must be a local machine problem or possibly an application problem. Each user logged into the application on the server with their own credentials once the RDP session was connected.  We were still not convinced that the network was not the problem because they never had the problem before. The next step was to try a machine at IU 13 which worked just fine.

About this time a new user suddenly began to experience problems. Their computer was just upgraded to Windows 7. The machine we had used to test from IU 13 was Windows XP and the one that was used to test at the district was Windows 7. The next step to confirm Windows 7 as the culprit was to place the district machine at IU 13 and test from there. That machine experienced the disconnects! We are finally getting somewhere. But what is different in Windows 7 that could cause random RDP disconnects?

The one other bit of information that I had from the service provider was that some users on networks where VOIP was in use sometimes had this problem. A few well selected keywords in google turned up this article about Windows 7 TCP auto-tune and broken RDP sessions.http://blog.tmcnet.com/blog/tom-keating/microsoft/remote-desktop-slow-problem-solved.asp As I read through it all the pieces fell into place.

This was my "ah-ha" moment like on the medical mystery TV shows. Prior to this nothing seemed to fit and everyone was just guessing. Suddenly all the random bits of data formed a complete picture.

Windows 7 uses aggressive TCP window scaling to get better performance on fast networks. This works great on "short" "fat" networks, such as from your desktop to a server on your local LAN. It also works great "long" "skinny" networks, like from your desktop across the Internet. When the network is "long" and "fat", like a school district connecting across PAIUnet (a gigabit statewide network) to a server, the aggressive nature of the window scaling causes problems.

So the problem was the network, it was too fast. The solution was to configure each of the Windows 7 clients to be less aggressive with the window scaling. Here is the command.

netsh interface tcp set global autotuninglevel=highlyrestricted 

If you want more details on this, take a look at this Microsoft Technet article. http://technet.microsoft.com/en-us/magazine/2007.01.cableguy.aspx