netsh winsock reset catalog

June 16th, 2006

Similar to the “netsh int ip reset all” command, the incantation “netsh winsock reset catalog” can work wonders for mysterious networking issues on Windows XP systems. Winsock, as we know, is short for “Windows Sockets” and describes how a Windows system should access network services. For most people, this means the port-based sockets of TCP/IP that make the Internet work for 98.42% of computer users these days (or whatever their ridiculously-large market share is). I personally first saw the term used in the 3rd-party software title “Trumpet Winsock,” which was used by many early-adopters of the Internet to hook their Windows 3.1 systems up before Windows 95 bundled winsock with the operating system.

Enough history, here’s what the command is doing:

  • netsh: this is a Windows utility that allows one to display or change network settings locally or remotely. The first part of this command simply tells Windows which utility you wish to use; the rest of the command consists of arguments to this utility.
  • winsock: this argument to the “netsh” utility specifies the context for the command. We want to affect the winsock implementation of the Windows system we’re running the command on, as we suspect that something spooky has been corrupted there. Another context that could have been specified here instead would be “ip.”
  • reset: this argument is an instruction within the previously-specifies context and subcontext means what it says, to reset to default. An example of another instruction that could have been specified here would be “show.”
  • catalog: this is an argument to the “reset” instruction telling the netsh utility what we would like to reset, specifically the winsock catalog. The winsock catalog can be thought of as a list of software that has been inserted into your TCP/IP. By resetting this listing, you are reasserting which background widgets should be handling your networking tasks.

An example winsock catalog entry would look something like the following:

Winsock Catalog Provider Entry
------------------------------------------------------
Entry Type:                         Base Service Provider
Description:                        MSAFD Tcpip [TCP/IP]
Provider ID:                        {E70F1AA0-AB8B-11CF-8CA3-00805F48A192}
Provider Path:                      %SystemRoot%system32mswsock.dll
Catalog Entry ID:                   1001
Version:                            2
Address Family:                     2
Max Address Length:                 16
Min Address Length:                 16
Socket Type:                        1
Protocol:                           6
Protocol Chain Length:              1

Any additional information regarding when resetting the IP interface is preferrable to resetting the winsock catalog would be appreciated. I tend to just have folks do both.

*Anecdotal evidence recommends a reboot after running this, though none should be strictly necessary.

27 Responses to “netsh winsock reset catalog”

  1. Ram Says:

    Excellent…!! but it would be very nice if u can tell us why we are using this netsh winsock reset catalog…!! pls tell us even about “Windows Sockets”.. if possible pls mail me….!!!

  2. Burrowowl Says:

    Ram,

    That’s a pretty tall order, but briefly: the “windows sockets” would be network sockets implementation for the Windows operating system. http://en.wikipedia.org/wiki/Internet_socket has a fairly straightforward explanation of what an Internet Socket is. The winsock catalog is a locally-maintained directory of handlers for the network sockets on your Windows system. If there’s something wrong with the catalog, you’ll start seeing problems that defy normal “check your settings and try again” troubleshooting.

  3. manish Says:

    is there a command for win vista like netsh

  4. Burrowowl Says:

    @manish: Windows Vista has netsh also, but with an extended set of commands available. The “netsh winsock reset catalog” command works as expected in Vista, you just need to run it from an elevated command prompt. There are about a half-dozen ways to do this, but the easiest for me to remember is to go to your start menu, type “cmd” into the search field, then right-click the “cmd.exe” icon that appears and select “run as administrator” from the context menu. Hope that helps!

  5. Jorge Says:

    so what all this mean is the tcip port damage or is only software issue because I already try everything and it doesn’t work what am trying now is wireless to see if the tcip port is damage maybe I can use the wireless one so am trying it tonight if works I let you know…. see u later.

  6. Burrowowl Says:

    @Jorge: This article is regarding network sockets and ports, not the physical ports on the computer itself. If all of your settings are correct and you’ve run a “netsh winsock reset catalog” and “netsh int ip reset all” and cannot pass any traffic over your ethernet card, I agree that it may be time to suspect the card itself (or its drivers). Of course, if you’re able to get online with your wireless card, it might be a good idea to check for new drivers on that ethernet card anyway.

  7. Steve Says:

    It’s important to mention that this resets all your LSP bindings in Windows so any Firewalls or Antivirus programs will need to be reinstalled to work effectively.

    Providing information on a command that is potentially destructive is ill advised when you don’t understand or describe it adequately.

    It’s best to use the command ‘netsh int ip reset’ first and reboot and see if that resolves your issue. Resetting the LSP catalog if it’s still behaving strangely should be seen as a last resort to fixing an issue with connectivity.

  8. Burrowowl Says:

    @Steve: Clearing out those additional bindings is pretty much the whole point. Resetting the IP interface first and rebooting is certainly reasonable, and not reflected in this article.

  9. Finn Says:

    I have an issue where when I get disconnected from the internet I cannot reconnect unless I reboot the computer, IE Diagnostics said it had an error with my winsock (info Error attmpting to validate the Winsock base providers. A reset is needed.) Is this command the thing I have to do to fix this issue?

    And are there any side major side effects of “netsh winsock reset catalog”

  10. Burrowowl Says:

    @Finn: resetting the winsock catalog will restore your socket handlers to the default, which means that anything special you’ve got set up (like many kinds of Internet security software or malware you unwittingly have on your box) will be disrupted, but that’s about it (and is why it’s helpful; that software may be breaking your connection). It shouldn’t wipe your hard drive or anything scary like that.

  11. DeeAdams Says:

    I’m hoping you still check from time-to-time. Here goes! There is something wrong with my home network. It started with my computer. I can connect to the wi-fi router, my LAN, and the internet. BUT, my web browser will not display web pages. I instead recieve a message simply stating, “ie can’nt connect”. when i let the wizard diagnose the issue, it say’s there is an issue connecting to DNS, DNS location not found. Tried the cmd listed here. it worked, 1day later(&>reinstal. norton Int. Sec) same problem. Has now(>4days) Slowly spread to my other 2 PCs. Someone,PLEASE, any suggestions?

  12. DeeAdams Says:

    Sorry, I forgot to check the box that sends me an email when/if there is a response to my post. My PDA using 3G is the only browser I have still operable. PLEASE respond to this post rather4 than the one before it. Thank you all for your time! ~Dee

  13. Burrowowl Says:

    For a problem where IE is unable to locate web pages, there are a couple of things I would recommend checking before resorting to netsh.

    First I’d check whether DNS is actually working. Try pinging some host for which you know both the name and the IP address (e.g. “sonic.net” is 209.204.190.64). If you can ping by the numeric address but not by the name, that is a good indication that your computer isn’t doing domain name resolution. This is a pretty likely cause for your problem, as all of your non-PDA computers are probably connected through the same router, which may be issuing bad DNS information. If DNS isn’t working properly, contact your ISP and find out that the IP addresses for their name servers are. You can specify them in your connection settings, bypassing whatever information they’re getting automatically via DHCP or PPPoE.

    If DNS is working, I would try an alternate web browser. I personally have IE, Firefox, and SRWare Iron on my home machine and laptop, so this may be easier for me than for you. If you cannot get on the web, getting an alternate browser can be tricky.

    In any case, bypassing the router is probably a good idea. It sounds like aside from your ISP, it is the only common factor between the computers that are all having the same problem, and it’s easier to switch out a router than it is to get your computers onto another server.

    I hope that helps!

  14. mash Says:

    As you said before ” “netsh winsock reset catalog” can work wonders for mysterious networking issues on Windows XP systems” and you are absolutely correct, have been through a terrible headache tring to sort out “listener” issues(oracle) kept switching up and down, but this command sorted me out. Thanks for your explanation.

  15. DaveKimble Says:

    netdiag /test:(winsock)
    tests your winsock without doing anything about it – might be better as a first step than just resetting.
    netdiag is an MS tool from your Win XP installation CD/valueadd/support/tools/
    it sees not only the physical adapters, but also the virtual pseudo-interface adapters.

  16. John Says:

    Thought I would add my 2 cents to maybe help Dee out. I worked as tech support for HP for 2 years, and we constantly had this issue. It was caused by the Norton Firewall. Our machines came with a trial version that would cause this. It would also happen if you “upgraded” from the trial version to a full version. I noticed she mentioned when she reinstalled Norton it started happening again. The trick on this is to totally remove Norton by using the Norton Removal tool on Symantics web site (you can google Norton Removal Tool). You need to remove using the tool and not the uninstall. The uninstall leaves (fragments) of the firewall behind and even after reseting the ip and winsock the problem will re-occur. Once all the “fragments” are gone you can reinstall a full fresh version of Norton and normally the problem won’t happen again. Unless of course Norton does an update ;)

  17. Steve Says:

    As a continuation of John’s comments the Direct Download for the Norton Removal Tool is available from http://www.symantec.com/nrt

  18. patrick Says:

    I was having a problem with an xp computer saying it was connected at 100 mbs, but I couldnt bring up the internet or exchange mail. I went thro device manager and tcp/ip properties in network connections. Double checked the default gateway and proxy server to make sure all was as it should. Still I couldnt connect. I used that command and next thing i know i was back in business .Thanks

  19. Nitin Says:

    Is the “netsh ip net reset catalog” exactly same as “netsh winsock reset catalog”.

  20. Steve Says:

    That syntax doesn’t appear to exist on Windows 7 Nitin for the netsh command.
    It may have possibly been for an older version on Windows maybe?

    To see what commands your version of netsh supports append a ? to the end:

    etc:
    netsh
    netsh interface ipv4 ?
    netsh winsock ?

  21. Burrowowl Says:

    This article was published three and a half years before Windows 7 was released.

  22. Steve Says:

    Good point :D

  23. DeeAdams Says:

    Thank you all for your solutions! John, your 2 cents was more like 2 million! It was NIS that caused to issue, followed John’s advice and the issue was resolved :)

  24. Hate to say it but Windows 7 sucks in my experience - Page 24 Says:

    […] […]

  25. Rob Says:

    You know what would be even better! Just give us the reset command! instead of all this mumbo jumbo!

  26. Geek Says:

    Someone dose not know how to use computers lol….’just give us the command!” first know what the command dose. second, command is there. Just admit your a NB, who dose not know the steps for commands.

  27. ruckie Says:

    I enjoyed reading these querries and solutions, hope this will help too.

    For data flow issues try this steps:

    1. Check your LAN or wifi connection
    2 Powercycle modem
    3. If no data flow: reset browser to default or delete browsing history
    4. Ping your modem e.g on cmd: ping 192.168.0.1 (check your default gateway address) also on cmd, type ipconfig
    5. Do winsock reset
    6. Turn UAC off
    7. Restart PC
    8. Disable firewall
    9. Disable/renable network adapter check tcp/ip settings
    10. Change wifi channel to 11, 6, or 1 (you may also reset modem to default)
    11. Call your ISP to check for old session: powercycling modem sometimes end old session and new ip address is assigned. It also fixes problems sending email
    12. If you’re using 4g or 3g modems: reregistration of the device(as the last resort) usually fix it including speed issue.
    13. You may email your comments or querries to ruck_fules747@yahoo.com

Leave a Reply