How to Repair a Corrupted TCP/IP Stack and Winsock on Windows 10/11

You have already tried restarting your router, flushing DNS, and reconnecting to Wi-Fi, but the internet still will not behave. Websites fail to load, DNS errors keep appearing, or the connection feels unstable no matter what you try. At this point, the problem may not be your Wi-Fi or your router at all. It may be something deeper inside Windows itself, called the TCP/IP stack, or a related system called Winsock.
These two systems handle almost every piece of network communication on your computer, quietly, in the background. When either one becomes corrupted, it can cause exactly the kind of confusing, hard-to-pin-down network problems that simpler fixes never quite solve.
In this guide, I will explain what these systems actually do, then walk you through resetting them safely using a few simple Command Prompt commands, with the exact text you need to type for each one, the same way I would if I were sitting next to you fixing this myself.
Problem Overview
Every time your computer sends or receives anything over the internet, whether it is loading a webpage or sending an email, that data travels through a system called TCP/IP. Think of it as the postal service of your computer, responsible for packaging, addressing, and delivering every piece of information correctly.
Winsock, short for Windows Sockets, is closely related. It is the part of Windows that lets programs like your browser actually talk to the TCP/IP system to send and receive data. If either of these becomes damaged or corrupted, whether from malware, a failed update, or a software conflict, your internet connection can behave strangely in ways that have nothing to do with your Wi-Fi signal or your router.
This is why this problem often shows up after simpler fixes fail. It sits at a deeper level than your Wi-Fi driver or your router settings, and it needs its own specific reset to fix.
Symptoms
You may be dealing with a corrupted TCP/IP stack or Winsock catalog if you notice any of the following:
A persistent No Internet Access message that other fixes have not resolved
Windows shows Unidentified Network, even after checking your router and drivers
DNS Server Not Responding errors that keep coming back after flushing DNS
Wi-Fi or Ethernet shows as connected, but no websites load
Limited connectivity messages appear repeatedly
Your network feels slow or unstable in a way that is hard to explain
Your computer fails to get a proper IP address, even though your router is working fine
Causes
A corrupted TCP/IP stack or Winsock catalog rarely happens on its own. Here are the common reasons behind it.
A corrupted TCP/IP stack, often caused by a failed Windows update, a sudden shutdown, or a deep software conflict.
A damaged Winsock catalog, which can happen after installing or uninstalling VPN software, firewalls, or antivirus tools that modify network settings.
Incorrect IP configuration, either entered manually by mistake or left behind by another program.
DNS cache corruption, where old, invalid website address information keeps interfering with new connections.
Outdated network drivers, which can conflict with how Windows manages network protocols.
Malware infections, some of which specifically target network settings to redirect or block your traffic.
VPN or proxy conflicts, where these tools alter network protocol settings and do not fully remove those changes when uninstalled.
Failed Windows updates that partially install and leave network components in a broken state.
Network adapter issues, where a failing or misconfigured adapter interacts poorly with the underlying protocol stack.
Important Topics to Understand
Before running any commands, it helps to understand a few basic ideas.
What the TCP/IP stack is: It is the core system Windows uses to format, address, and route every piece of data sent or received over a network. Nearly every internet problem eventually passes through this system in some way.
When to reset network protocols: This kind of reset is best used after simpler fixes, like restarting your router or flushing DNS, have already failed to solve a persistent, unexplained connection problem.
What the CMD commands actually do: Each command in this guide targets a specific part of the network system, from resetting Winsock, to rebuilding the IP stack, to clearing DNS records. Running them in the right order gives Windows a clean foundation to reconnect from. Every command must be typed exactly as shown, then confirmed by pressing Enter.
Step-by-Step Fix Methods
Before starting, make sure you know your Wi-Fi password if applicable, since some of these steps may require reconnecting afterward. All of the following commands must be typed into Command Prompt running as an Administrator, or they will not work.
Fix 1: Open Command Prompt as Administrator
What it means: Opening the command line tool with full permissions, since network-level changes require administrator access.
Why it works: Without administrator rights, Windows blocks these commands from making system-level changes, and you will see an access denied message instead.
How to do it: Click the Start button, type cmd, then right-click Command Prompt from the results and choose Run as administrator. Click Yes if Windows asks for permission. A black window will open with the title Administrator: Command Prompt at the top. This confirms you are ready to type the commands in the next steps.
Expected Result: A Command Prompt window opens showing Administrator in the title bar, with a blinking cursor ready for input.
If Fix Fails: If the option to run as administrator does not appear, make sure you are logged into an account with administrator permissions on the computer.
Fix 2: Reset Winsock
What it means: Rebuilding the Winsock catalog, which is the system that lets programs communicate with the network stack.
Why it works: A corrupted Winsock catalog can block programs from properly sending or receiving network data, even when your connection itself looks fine.
Command to type:
How to do it: In the Administrator Command Prompt window, type the command exactly as shown above, then press Enter. Do not close the window afterward, since more commands follow in the next steps.
Expected Result: You will see a message confirming the Winsock catalog was reset, along with a note that you need to restart your computer for the change to take effect.
If Fix Fails: If you see an error instead of a confirmation, make sure you are running Command Prompt as Administrator, then try the command again.
Fix 3: Reset the TCP/IP Stack
What it means: Rebuilding the entire TCP/IP configuration from scratch, back to its default state.
Why it works: This clears out any deep corruption in how Windows manages your network protocols, which can be the true root cause behind persistent, unexplained connection issues.
Command to type:
How to do it: In the same Command Prompt window, type the command exactly as shown above, then press Enter.
Expected Result: You will see a report confirming several network settings were reset successfully.
If Fix Fails: If you see specific errors during this step, note them down, since they can help identify the exact protocol component causing trouble. Continue to the remaining commands regardless.
Fix 4: Release and Renew Your IP Address
What it means: Giving up your current network address and requesting a brand new one from your router.
Why it works: After resetting the TCP/IP stack, requesting a fresh IP address ensures your computer starts clean instead of holding onto old, possibly corrupted address information.
Commands to type, one at a time:
then press Enter. Wait a few seconds. Then type
then press Enter.
How to do it: Type the first command, wait for it to finish, then type the second command and wait again.
Expected Result: Windows shows a new IP address being assigned to your network adapter.
If Fix Fails: If this step fails or shows an error, your router may need a restart as well, or DHCP may need to be checked on the router itself.
Fix 5: Flush and Re-register DNS
What it means: Clearing out old, saved website address records, then telling Windows to register fresh DNS information.
Why it works: Old DNS records can conflict with the fresh network configuration you just created in the earlier steps.
Commands to type, one at a time:
then press Enter. Then type
then press Enter.
How to do it: Type the first command, wait for the confirmation message, then type the second command.
Expected Result: You will see a confirmation message for the DNS flush, and the registration command will run without errors.
If Fix Fails: This step rarely fails on its own. If it does show an error, proceed to restart your computer anyway, since the earlier resets are the most important part of this process.
Fix 6: Restart Your Computer
What it means: Rebooting Windows so that all the changes made by the previous commands are fully applied.
Why it works: Several of the settings changed by these commands, especially the Winsock reset, do not take effect until after a restart.
How to do it: Save any open work, then restart your computer normally through the Start menu. No command is needed for this step.
Expected Result: After restarting, your internet connection should work normally, with no more DNS errors, Unidentified Network messages, or connectivity drops.
If Fix Fails: Continue to verifying your configuration below.
Fix 7: Verify Your Network Configuration
What it means: Checking that your computer received a proper, working network configuration after the reset.
Why it works: This confirms whether the reset actually solved the problem, or whether a deeper issue, like a driver or hardware problem, still remains.
Command to type:
How to do it: Open Command Prompt as Administrator again, type the command exactly as shown above, and press Enter. Look through the results for a proper IP address that does not start with 169.254, along with valid DNS server entries listed further down.
Expected Result: You see a normal IP address and valid DNS servers listed, confirming the network is properly configured.
If Fix Fails: If you still see a self-assigned address starting with 169.254, or no DNS servers listed, the issue may be with your network drivers or your router, rather than the TCP/IP stack itself.
Fix 8: Update or Reinstall Network Drivers
What it means: Installing the latest version of the software that lets Windows communicate with your network adapter.
Why it works: If the TCP/IP and Winsock reset did not fully solve the problem, an outdated or corrupted driver may still be interfering underneath.
How to do it: Right-click the Start button, choose Device Manager, expand Network adapters, right-click your adapter, and choose Update driver, then Search automatically for drivers. If that does not help, visit your computer manufacturer's official website and download the latest driver manually. No Command Prompt command is needed for this step.
Expected Result: The network stabilizes fully once the correct, updated driver is installed.
If Fix Fails: If problems continue even after updating drivers, consider a full Network Reset, described in the advanced fixes below.
All Commands in Order
For quick reference, here are all the commands from this guide, listed in the exact order you should type them, each on its own line, pressing Enter after every single one.
ipconfig /all (use this afterward only to check your results, not as part of the reset itself)
Advanced Fixes
Use Network Reset for a broader repair. If the manual commands do not fully solve the problem, Windows offers a built-in option under Settings, then Network and Internet, then Advanced network settings, then Network reset, which removes and reinstalls all network adapters along with their settings.
Check for malware. Since some malware specifically targets network settings, run a full system scan using Windows Security or a trusted antivirus tool to rule this out.
Review recently installed VPN or firewall software. If the problem started after installing or removing a VPN app or firewall tool, check whether it left behind custom network protocol settings that may need to be manually removed.
Check Windows Update history. If a recent update coincided with the start of your network problems, check Settings, then Windows Update, then Update History, and consider uninstalling the most recent update to see if that resolves the issue.
Prevention Tips
Avoid installing unnecessary VPN, proxy, or firewall tools that you do not actively use, since these can modify low-level network settings.
Keep your network drivers updated regularly, especially after major Windows updates.
Run periodic malware scans, since some infections specifically target network configuration.
Create a system restore point before installing new networking software, so you can undo changes easily if something goes wrong later.
Avoid manually editing IP or DNS settings unless you clearly understand what each value does.
Conclusion
A corrupted TCP/IP stack or Winsock catalog is often the hidden cause behind network problems that refuse to go away, even after trying every other fix. The good news is that repairing it takes only a few simple Command Prompt commands and a restart, without needing to touch any hardware.
Type each command in this guide in order, starting with netsh winsock reset and netsh int ip reset, then release and renew your IP address, flush and re-register DNS, and restart your computer. Afterward, check ipconfig /all to confirm everything is working. If the problem still continues after all of this, it is worth checking your network drivers, scanning for malware, or considering a full Network Reset as a broader fix.
How to Fix "Unidentified Network / No Internet Access" Errors in Windows
Wi-Fi Keeps Disconnecting on Windows 10/11: Causes and Step-by-Step Fixes
Fix Wi-Fi Connection Issues on Windows 10 and 11: Troubleshooting Guide
How to Fix "DNS Server Not Responding" Error on Windows 11/10 Permanently
Frequently Asked Questions
What does netsh winsock reset do?
It rebuilds the Winsock catalog, which is the part of Windows that lets programs like your browser communicate properly with the network stack. This fixes many hard-to-explain connectivity issues.
Is resetting the TCP/IP stack safe?
Yes, it is a safe, standard Windows troubleshooting step. It only resets network protocol settings back to their default state and does not affect your personal files or installed programs.
Do I need to restart my PC after running the commands?
Yes. Several of the changes, especially the Winsock reset, require a restart before they fully take effect, so always restart after running these commands.
Will resetting TCP/IP delete my files?
No. Resetting TCP/IP and Winsock only affects network configuration settings. It does not touch your personal files, documents, photos, or installed applications.
When should I use Network Reset instead of CMD commands?
Use the CMD commands first, since they are quicker and more targeted. If the problem persists after trying them, Network Reset offers a broader fix by fully removing and reinstalling all network adapters and their settings.