Introduction / Why This Is Needed
The Windows network stack is a complex of system components and libraries (TCP/IP, Winsock) responsible for all network activity: internet connectivity, Wi-Fi operation, local networks, and VPN. Over time, configuration files and registry entries can become corrupted due to crashes, software conflicts, or viruses. This leads to symptoms like "No network access," "Unidentified network," DNS errors, inability to connect to specific sites, or Wi-Fi drops.
Resetting the network stack is a drastic but safe way to restore these components to their "default" state. You do not remove adapter drivers or programs, but you clear corrupted protocol settings. This method often solves problems that standard diagnostics tools cannot fix.
Requirements / Preparation
- Administrator privileges. All commands require running as an administrator.
- Stable power supply. The reset and reboot process must not be interrupted.
- Local network access (optional). If you have a static IP or specific DNS settings from your provider, note them down in advance (IP address, subnet mask, gateway, DNS servers). After the reset, these settings will be cleared, and you will need to re-enter them.
- Save your work. Close all applications, especially those that use the network (browsers, messengers, cloud sync services).
Step 1: Launch Command Prompt or PowerShell as Administrator
This is the critical step. Commands will not work without administrator rights.
- Press the Win + X keys on your keyboard.
- In the menu that appears, select "Windows PowerShell (Admin)" or "Command Prompt (Admin)" (depending on your Windows version).
- If a User Account Control (UAC) prompt appears, click "Yes".
You will see a black or blue window with the title "Administrator: ...".
# Example of a PowerShell window with admin rights.
# The Command Prompt prompt usually ends with >
# In PowerShell, it ends with PS C:\Windows\system32>
Step 2: Reset TCP/IP and Winsock Components
Execute the commands strictly in order.
2.1. Reset TCP/IP
This command overwrites two key system files (%windir%\inf\nettcpip.inf and %windir%\system32\drivers\etc\hosts) and updates registry entries related to the TCP/IP protocol.
netsh int ip reset resetlog.txt
resetlog.txtis the name of the log file where information about the changes made will be recorded. The file will be created in theC:\Windows\folder. You can delete it after verification.- Expected result: message
TCP/IP reset completed successfully.
2.2. Reset Winsock (Sockets)
Winsock is the API that allows programs to use network services. Its corruption causes many "mysterious" network errors.
netsh winsock reset
- Expected result: message
Winsock reset completed successfully. You must restart the computer for the changes to take effect.
⚠️ Important: Do not run these commands simultaneously in different windows. Execute them sequentially in the same administrator session.
Step 3: Reboot the Computer
This is a mandatory step. Without a reboot, all changes made to the registry and system files will not be activated.
- Close the PowerShell/Command Prompt window.
- Click the Start button → the Restart button (or use
Win + D, thenAlt + F4and select "Restart"). - Wait for the system to fully load.
After the reboot, Windows will automatically reinstall the default settings for network components.
Verify the Result
After booting, check if the problem is solved:
- Check adapter status:
- Press Win + R, type
ncpa.cpl, press Enter. - Ensure your network adapter (Ethernet or Wi-Fi) is not disabled and has an "Enabled" status.
- If using a static IP, check its correctness in the adapter properties (
Properties→Internet Protocol Version 4 (TCP/IPv4)).
- Press Win + R, type
- Try pinging a public address:
Open PowerShell (not as administrator) and run:
ping 8.8.8.8- If you see replies like "Reply from 8.8.8.8...", the network connection at the IP level works.
- If "Request timed out...", the problem may be at the driver, hardware, or router level.
- Check DNS:
nslookup google.com
A successful query will return Google's IP addresses. If you get a "Server failed" error, the issue is with DNS settings (they need to be reconfigured after the reset). - Open a website in your browser. Try visiting several different sites (e.g.,
yandex.com,microsoft.com).
Potential Issues
Issue: No network access after reboot, but ping to 8.8.8.8 works.
- Cause: DNS or proxy settings were messed up.
- Solution: Check DNS settings in the adapter properties. Set DNS to automatic or manually specify public DNS (e.g.,
8.8.8.8and8.8.4.4from Google). Check proxy settings in your browser and system (Windows Settings→Network & Internet→Proxy).
Issue: netsh command not found or "Administrator privileges required."
- Cause: The session was not launched as administrator.
- Solution: Close the current window. Launch PowerShell/Command Prompt only via the Win+X menu by selecting the "Admin" option.
Issue: All Wi-Fi networks disappeared after the reset.
- Cause: The TCP/IP reset does not touch Wi-Fi profiles. If networks are gone, the problem is likely with the driver or the WLAN AutoConfig service.
- Solution:
- Check if the "WLAN AutoConfig" service is running. Run
services.msc, find the service, set the startup type to "Automatic" and start it. - Update or reinstall the Wi-Fi adapter driver via Device Manager (
devmgmt.msc).
- Check if the "WLAN AutoConfig" service is running. Run
Issue: Error "The system cannot find the file specified" when running netsh int ip reset.
- Cause: Corruption of Windows system files.
- Solution: Run a system file integrity check as administrator:
After completion, restart the computer and repeat the reset.sfc /scannow
Alternative Method: Full Network Reset via Windows Settings
Windows 10 (version 1803+) and Windows 11 have a built-in graphical tool that does something similar but with additional options (removing VPN, adapters, resetting the firewall).
- Open Windows Settings (
Win + I). - Go to
Network & Internet→Advanced network settings. - At the bottom of the page, click "Network reset" (or
Network reset). - Click "Reset now", confirm the action.
- The computer will restart automatically in 5 minutes. After the reboot, you will need to re-enter Wi-Fi passwords and reconfigure VPN.
💡 Tip: Use this method if the
netshreset didn't help, or if you have many lingering VPN connections and virtual adapters. It is more thorough.
Prevention and Recommendations
- Create a system restore point before making any major network changes. This allows you to roll back if something goes wrong (search Windows for "Create a restore point").
- Install network adapter drivers from the manufacturer's official website (laptop or motherboard), not through Windows Update.
- Avoid installing "optimizers" and "registry cleaners" that often break Winsock settings.
- After a successful reset and connection recovery, configure static IP or DNS settings in advance if your network requires it, to avoid forgetting.