Resetting the TCP/IP and WinSock Stacks on Windows Systems
Table of Contents
Summary
This post contains notes for resetting the TCP/IP and WinSock stacks on Windows Systems. Doing so can generally be a good troubleshooting step when you’re having issues with network connectivity and network interfaces.
The need for this can stem from a corrupt or misconfigured TCP/IP or WinSock stack.
Before performing the commands in this article. An Administrator CMD or PowerShell prompt will need to be opened.
Reasons For This
There are some valid reasons for needing to do this.
- Post Malware removal.
- DNS lookup issues. (Sort of.)
- Limited or no connectivity errors.
- If network connectivity keeps dropping on the workstation. But, seems to keep working on every other workstation on the network. Though, do make sure to check for other issues.
- BSOD messages that indicate an issue with the tcpip.sys driver.
If I run into something and remember about this post. I’ll provide an update to an issue that’s performing this operation has fixed.
Resetting WinSock
This command will reset the Winsock Catalog.
Winsock Catalog registry path is below.
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\Protocol_Catalog9
Performing the command below will return the Winsock Catalog to a clean stated. Uninstalling all Winsock Layered Service Providers.
netsh winsock reset
Resetting TCP/IP
Generally used when you’re having network connectivity issues.
The following command will rewrite the registry keys below. I’ll provide more data later on this.
- SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
- SYSTEM\CurrentControlSet\Services\DHCP\Parameters\
netsh interface ip reset
Release, Renew, and Flushdns
One good thing to do after you reset the WinSock and TCP/IP Stacks on Windows boxes is reset the IP address configuration in DHCP. This is only if it’s configured of course. If you have a static configuration. You should just be able to reboot.
I have another article for this. That I’m showing below.
Conclusion
After you’ve gone through this article. Reboot your workstation so the changes apply properly.