Problems With The LSP / Winsock Layer In Your Network

Microsoft Windows, by default, uses Internet Protocol (IP) for all communications, whether locally (LAN) or remotely (WAN), though it will use other transports for LAN traffic, if you desire. The connection between the applications (programs that you run) on your computer, and the wires, whether physical (Ethernet) or logical (WiFi), is thru a series of programs, arranged in layers.

The Layered Service Provider (LSP) / Windows Sockets (Winsock) portion of the network stack is a key component in all network traffic, LAN and WAN. When it stops working, we say that it's "corrupted". The symptoms of corruption can be unpredictable. By "unpredictable", I've experienced / seen:

  • Connectivity thru some services, but not all.
    • Low level services like ping may work, but email won't work.
    • Email might work, but not the browser.
    • If you have multiple browsers, maybe Firefox will work but Internet Explorer won't.
  • Connectivity to local addresses, but nothing on the Internet.
  • Connectivity to some computers on the LAN, but not others.
  • Slow connectivity all around.
  • Strange diagnoses / messages, mentioning mysterious objects like handles, semaphores, or sockets.
  • Strange name / address resolution results (garbled names).

There are multiple possible solutions to an LSP / Winsock problem, and not one of them have been found to be consistently more effective than the others. Some of them may fix some problems, but find additional problems when run a second time.

Try each solution, if applicable to your system, one after the other, until your problem is resolved. If any of these tools recommend changes, and / or make any changes for you, yet the problems are not fully resolved, continue with the other tools. Then, repeat the entire list.

Each time any changes are made, repeat the diagnosis made previously. Verify that the problem is still with you.

If you do have an LSP / Winsock problem, ignoring it and investigating something easier will not make the problem go away. Be patient, and persistent.
  1. Try the easiest solution first. Restart the computer, if you haven't yet done this.
  2. Check for a DNS or MTU problem, which can imitate, or mask, a corrupt LSP / Winsock.
  3. LSP-Fix.
  4. WinsockFix.
  5. Winsock2 Fix (Windows 98 / ME only).
  6. WinSock XP Fix (Windows XP only).
  7. For Windows Vista or XP only, use Windows native procedures. This will vary according to Service Pack level and Version.

    • To fix a corrupted LSP / Winsock in Windows XP pre-SP2:
      1. Backup and delete the following registry keys:
        [HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Services\ Winsock]
        [HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Services\ Winsock2]
      2. Reboot.
      3. Open the network connections folder, right click your network connection, and click Properties.
      4. Click Install | Protocol | Add.
      5. Click "Have Disk...", type "\windows\inf" in the box, and click OK.
      6. Click "Internet Protocol (TCP/IP)", then click OK.
      7. Reboot.
    • To fix a corrupted LSP / Winsock in XP SP2:
      1. Open a Command Window.
      2. Type "netsh winsock reset catalog" into the command window.
      3. Reboot.
    • To fix a corrupted LSP / Winsock in Vista:
      1. Open a Vista Command Window.
      2. Type "netsh winsock reset" into the window, and press Enter.
      3. Reboot.

  8. Try a registry based rebuild, from Bob Cerelli, One Computer Guy. First, remove the corrupted registry keys. Next, apply the correct, standard registry keys. This will vary by operating system version.
    1. Windows 98.
    2. Windows ME.
    3. Windows 2000.
    4. Windows XP.
    Note no registry based fix is available for Windows Vista, as of yet.
  9. An additional possibility is corruption in the TCP/IP components. Although LSP / Winsock provides part of the TCP/IP functionality, it is not solely a part of TCP/IP (it can include IPX/SPX and NetBEUI components). The IP stack is separate from LSP / Winsock, and sometimes you will need to (KB299357): reset TCP/IP in Windows Vista or XP, or reload TCP/IP in pre-Windows XP.
  10. Next, Re Install Your Network Hardware - first the drivers, then the physical device (if possible).
  11. Since system files may have been deleted or altered, try a repair install of Windows.


NOTE: LSPFix, and its peers, identifies and removes problems in the LSP / Winsock stack. If LSPFix, or one of its peers, identifies a stack entry as problematic, you have to trust it, and let it fix the problem. If your network is not working (which, I presume, is why you're here), give it a shot. Create a System Restore checkpoint, if you wish (and take a second checkpoint later, if the problem is fixed).

NOTE: If you're still unsure whether you can trust my advice, and put your computer at the mercy of some free software that you just downloaded, this is good. Be skeptical - that's the beneficial side of paranoia. Next, read Download Software Selectively. Finally, spend some time researching, as advised.

As a last resort, try and diagnose the problem, by enumerating the contents of the LSP. You might identify an unknown problem, and more than you might benefit from your efforts. LSP enumeration will vary, according to what operating system is running on your computer.

For more information about LSP / Winsock problems, see the Microsoft articles


>> Top

5 comments:

cooker315 said...

Thanks Chuck for the great site. After 3 nights I have been freed. I only wish I found this sooner. Never would have fixed it on my own - LPS-Fix did the trick on a winsock or registry problem!

Mike Johnson said...

Just 'thanks' Chuck! It took me until winsocfix but then they were back online after months following a clumsy installation of a webcam (on a friend's pc).

D. Bates said...

After nearly two weeks of frustration, I was finally able to repair my internet connection thanks to your article. Keep up the good blog!

Unknown said...

Some days ago my net connection was disrupted due to the winsock problem. Now it is completely solved. Thanks a lot to your article

Alan said...

Thanks for the Kung Fu! Finally figured out how to clear corrupt winsock cache!