The Broadband Guide
SG
search advanced

Windows XP SP2 tcpip.sys connection limit patch

Additional XP SP2 tweaks - Remove the Windows XP SP2 TCP Connection limit (Event ID 4226)
2004-09-18 (updated: 2009-12-08) by
Tags: , , , ,

In addition to the tweaks already covered in Win 2k/XP Registry Tweaks and More Win 2k/XP Tweaks, the Windows XP Service Pack 2 introduces a few new issues covered in the article below. Please make sure you understand what you are doing before making any changes to your Operating System. Note the information below only applies to Windows XP Service Pack 2.

 

Remove the limit on TCP connection attempts

Windws XP SP2 introduces a few new twists to TCP/IP in order to babysit users and "reduce the threat" of worms spreading fast without control. In one such attempt, the devs seem to have limited the number of possible TCP connection attempts per second to 10 (from unlimited in SP1). This argumentative feature can possibly affect server and P2P programs that need to open many outbound connections at the same time.

Rant: The forward thinking of Microsoft developers here is that you can only infect 10 new systems per second via TCP/IP ?!?... If you also consider that each of those infected computers will infect 10 others at the same rate:
second 1:  1+10 computers
second 2: 10+10*10 computers (110 new ones)
second 3: 10+100*10 computers ( 1110 new ones)
second 4: 10+1000*10 computers (11110 new ones)
....
all the way to 10*60 + 10^60 computers in a single minute (that's a number with 60 digits, or it would far exceed Earth's population). Even if we consider that 90% of those computers are unreachable/protected, one would still reach ALL of them within a minute.

In other words, even though it is not going to stop worm spreading, it's going to delay it a few seconds, limit possible network congestion a bit, and limit the use of your PC to 10 connection attempts per second in the process ! I have no problem with the new default setting limiting outbound connection attempts. Still, users should have the option to easily disable or change this setting. I might be going out on a limb here, but ever since the introduction of Windows XP I can't help thinking that I dislike all the bult-in Windows "wisardry" in a sense that the system also limits user access. That irritating trend to ease the mental load on end users is somewhat insulting, considering that Windows is to make the more "intelligent" choice instead of the end user, as well as limit their access to tuning such settings...
End of rant.

With the new implementation, if a P2P or some other network program attempts to connect to 100 sites at once, it would only be able to connect to 10 per second, so it would take it 10 seconds to reach all 100. In addition, even though the setting was registry editable in XP SP1, it is now only possible to edit by changing it directly in the system file tcpip.sys. To make matters worse, that file is in use, so you also need to be in Safe mode in order to edit it.

You only need to worry about the number of connection attempts per second if you have noticed a slowdown in network programs requiring a number of connections opened at once. You can check if you're hitting this limit from the Event Viewer, under System - look for TCP/IP Warnings saying: "TCP/IP has reached the security limit imposed on the number of concurrent TCP connect attempts". Keep in mind this is a cap only on incomplete outbound connect attempts per second, not total connections. Still, running servers and P2P programs can definitely be affected by this new limitation. Use the fix as you see fit.

To change or remove the limit, you can use the following program:

Event ID 4226 Patcher - A patching program for removing or changing the limit imposed on connection attempts in SP2. The patcher has the ability to restore tcpip.sys back to the original... Still, you might want to back up tcpip.sys, use it at your own risk. The author of this patch can be reached @ http://www.lvllord.de/

 

Edit tcpip.sys manually to remove the TCP/IP socket creation limit

Another option, for the more adventurous is to modify your tcpip.sys file manually, using a hex editor. The following instructions refer to the final release of XP SP2, with a tcpip.sys file of exactly 359,040 bytes, CRC-32 is 8042A9FB, and MD5 is 9F4B36614A0FC234525BA224957DE55C. Even thouh there might be multiple tcpip.sys files in your system, make sure to work with the one in c:\windows\system32\drives\ directory.

To remove the tcpip.sys socket creation limit:
- Backup your original tcpip.sys file before editing please, this is somewhat important !
- In your hex editor, go to  offset 4F322 hex (or 324386 decimal).
- Change 0a 00 00 00  to  00 00 0a 00

All done !  The above change does not require editing of the CRC in offset 130 hex (thanks for the clever solution Thomas Wolf Tompkins).

Notes:
If any of the data above does not match exactly (crc, file size, md5, or the data at offset 4F322) please double-check what you are doing, or abort completely.

The above information increases the RATE of opening outgoing connections. It has nothing to do with the limit of 10 connections to network shares on a Windows workstation PC for sharing files (a MS imposed limit to force you to upgrade to a server version of the OS). This 10 connections to network shares limit was introduced with NT4 workstation (SP3), and exists in Windows 2k workstation, and Windows XP home/pro/mc. It only applies to authenticated windows services, such as file and print sharing.

 

For a Vista version of the above tweak, see our Windows Vista tcpip.sys connection limit patck for Event ID 4226 article.

  User Reviews/Comments:
    rate:
   avg:
by Dieter - 2008-04-25 21:20
I had the same problem as efgerman, but i found a way to solve it, so i thought i'd share it.

1. Copy the tcpip.sys file to any location.
2. Rename it. (to something like tcpip_edit.sys)
3. Edit it so that the tcpip.sys socket creation limit is removed.
4. Reboot and boot in safe mode with dos prompt. (don't know if it
works in the other safe mode too)
5. Move the edited tcpip.sys file(tcpip_edit.sys) to the
windows\system32\drivers folder.
6. Rename the original tcpip.sys file (to something like tcpip_ori.sys)
7. Rename the edited tcpip.sys file (tcpip_edit.sys) back to tcpip.sys
8. Reboot

You're done!
by xppro-sp3user - 2008-05-09 17:13
Just updated to XP service pack 3 yesterday. The new info for tcpip.sys is 04/14/2008 12:50 AM 361,344 tcpip.sys. The md5 is now 93ea8d04ec73a85db02eb8805988f733. I noticed I started getting the 4226 error which is why I researched this and I recall that I did change tcpip.sys in the past with one of the patch tools.
by anonymous - 2008-05-24 13:49
can someone please provide a patched tcpip.sys file for XP PRO+ HOME SP3 ?

Thx
by Don - 2008-07-03 21:22
Ok are there any problems in windows XP sp3?
by amadeov - 2008-07-09 21:14
After automatically downloading the newest Microsoft update (KB951748 - DNS System Patch) earlier this morning, I saw that there were Event ID 4226 errors throughout my System log *AND* I saw that all of my torrents were stopped or not downloading correctly in uTorrent. After re-applying the patch (I had done this a few months ago), the torrents came back online and web pages immediately started opening at proper speeds. =)
by Darr - 2008-07-10 18:35
It's been awhile since I patched mine (pre SP3), and I also finally noticed the event in my logs (so I don't get in there very often, 'k? ;-)... the info for the version I have is
CRC32 - C7935406
MD5 - 9aefa14bd6b182d61e3119fa5f436d3d
size - 361,600 bytes
version - 5.1.2600.5625 (xpsp_sp3_gdr.080620-1249)

So apparently MS is replacing it over and over, 'cause I downloaded the SP3 ISO to share and updated the day it came out (5/06?), and this file has a modified date of 2008/06/20.

The manual HEX edit instructions have been incorrect for some time. Searching for ''00 0A 00 00 00 B8'' instead of '0A 00 00 00' goes right to the correct offset at 4FB46 in this file. Off to reboot now. :-)
by whoppie - 2008-07-11 04:45
Love this patch. Its working like a charm on my system, XP Pro SP3. I too saw the warnings in the eventlog after applying the latest patches from MS, so I re-ran the patch and its working perfectly again.

Wonder why so many of you are experiencing problems with this patch...
by VISRI - 2008-07-24 18:05
thanks man,
works great for me
by Will - 2008-08-05 22:21
I see your post...

I need know if this fix solve this http://support.microsoft.com/kb/111855/en-us

If no , have another way ?

thanks

William
by Groovehound - 2008-08-11 12:11
Well, there's still people using the lvlord patch. This hasn't been updated for YEARS. The TCP/IP.sys file HAS! This is for security reasons (maybe for other bugs too). Why would you all want to patch with an older version of the file and make yourselves vulnerable to attacks?
Personally, I'm going to look at the correct offset for the LATEST version of the file from SP3, and I'm surprised no-one here got that done yet...
The P2P applications work in different ways, I'm sure some of them are affected significantly by this and it's not just as simple as waiting for peers to be found.
by anonymous - 2008-09-20 02:00
Any updates for XP SP3?
by anonymous - 2008-09-24 15:17
You can use http://hwrms.com/blog/?p=17 XP sp3 patcher
by anonymous - 2008-10-16 15:28
The patch is a miracle! :) I kept on disconnected from my isp while running uTorrent before I applied the patch. Now it runs great. Thanks man!
by Deric - 2008-11-21 01:05
I still have problems. i have a computer with win xp sp2 proffesional on it and i need that a number of 20 clients acces my share in the same time.
But the problem is that only 10 users can acces share in the same time.
if you have any ideas pls write to me on dericlaw@gmail.com
by anonymous - 2008-11-28 06:48
THE PATCHER DOSN'T WORK
by naz - 2009-01-08 18:07
I was just wondering....this patch probably wont work anymore since we now have SP3. Is there a new one? I am definitely in need of said patch :/ any ideas?
by Yetii - 2009-01-12 09:10
Just found this, I think the name says it all.
Give it a (careful) try
http://www.softpedia.com/get/Tweak/Network-Tweak/TCP-Z.shtml
by Farish - 2009-01-12 10:19
Can anyone please tell me the limit on simultaneous TCP connections in win xp not in terms of 10 connections per second. I mean the total socket connections that can be established irrespective of the time it takes to make those connections.

i m using a tcp client to make the connections from winxp and the server is on linux.
by anonymous - 2009-05-18 11:16
how do i check of the patch has allowed more ports? the net is so fickle, i cannot tell if i have a better speed.

thanks
nick
by saranglonkar2005 - 2009-05-25 21:18
I am not a computer man, but I have a software that provides file transfer to only 5 selected clients at a time. The total computers connected in LAN are 30 max with windows xp/sp2 or sp3.

The software creates 5 folders on the server -one for each client-and asks the clients to copy from the server from their respective folders. All worked fine in several installations except one. I get access denied message on clients and only 2 or 3 clients out of 5 receive the file.

Does this have anything to do with the limit of 10 discussed here?
What could be the probable solution. Can anyone help?
by anonymous - 2009-06-26 08:29
The concurrent outgoing connections to http servers is default of 10, the other guys are talking about iis which is crippled to 10 incoming connections on xp systems.

You can make xp replace the tcpip.sys dll for you, by replacing the new one in the patch download uninstall folder with the old one, then patch the one in use. This forces Windows system file protection to kick in and replace it with the latest one in the patch folder. Hence it replaces the new one with your old one. This technique can be used to replace any system dlls with the added bonus that the system still thinks its successfully patched. you may need to reboot to make wsfp to kick in.

This same technique is used to install IIS on winxp Home edition, using win2000 dlls

There are tools to patch running loaded dlls by unhooking them at the process level patching and rehooking the dlls.
by Obiwan_Kenobi - 2009-06-28 15:50
I am new to the group and I want to thank you for the valuable help.
I tried the german Evid Patch. Didn't work for me because it can't write the final patched file to the Drivers folder of my XP SP3 operating system.
I tried the alternative TCP-Z. It reports to work. After this, I'd tried again the Evid Patch just to watch the screen without patching, and it reported that the TCPIP.SYS file has been fixed by the other software. I am now going to open the file manually with an Hex editor just to see it by myself.
I cannot say that this has improved performance. I've got the same results. I am downloading a very large file and I cannot get more than 10 peers connected an a poor 40 Kb/s download. I restarted the system every time I made a change. I'm not a Torrent expert myself and I think that I am still missing something to do. Any ideas ? Thank you again :-)
by dzupaks - 2009-07-07 03:18
We have an 8 pc setup, but one is XP Home, and the rest is XP Pro.. if all will connect to one pc that we served as server, one or two will hung-up and must close one station for other station to continue.. will the patch matter for XP Pro and Home?
by Philip - 2009-07-07 03:58
This article will not fix the local network inbound connection limit of Windws XP Home (5) and Pro (10) for shares, printers, etc. I'd suggest reducing the timeout (15 minutes by default) as described here:
http://support.microsoft.com/kb/314882
News Glossary of Terms FAQs Polls Cool Links SpeedGuide Teams SG Premium Services SG Gear Store
Registry Tweaks Broadband Tools Downloads/Patches Broadband Hardware SG Ports Database Security Default Passwords User Stories
Broadband Routers Wireless Firewalls / VPNs Software Hardware User Reviews
Broadband Security Editorials General User Articles Quick Reference
Broadband Forums General Discussions
Advertising Awards Link to us Server Statistics Helping SG About