Introduction / Why This Is Needed
The TCP/IP stack is a fundamental set of protocols responsible for all network communication in Windows. Sometimes its system files or registry entries become corrupted due to crashes, software conflicts, or malware. This manifests as the computer "seeing" the network but being unable to obtain an IP address, ping to the gateway failing, or the browser not opening sites, even though other devices on the network work.
This guide describes a safe and official method for restoring the TCP/IP stack using the netsh utility. This command is the first level of diagnostics before more drastic actions, such as resetting all network settings through Windows parameters or reinstalling drivers.
After following the instructions, you will restore standard network connectivity functionality without losing user settings (static IP, DNS servers).
Requirements / Preparation
- Administrator privileges: All commands require running as an administrator.
- Stable power supply: On a laptop, ensure it is plugged in.
- Internet access via another device: In case you need to download drivers or updates after the reset.
- Knowledge of your network settings (optional): If you use a static IP address or third-party DNS servers (e.g., Cloudflare, Google DNS), write them down beforehand. After the reset and reboot, settings will likely revert to DHCP, and you will need to reconfigure them.
Step-by-Step Instructions
Step 1: Launch Command Prompt or PowerShell with Elevated Privileges
This is a mandatory condition. Without administrator rights, the netsh command cannot make changes to system files.
- Press the Win + X keys on your keyboard.
- In the menu that appears, select "Windows PowerShell (Administrator)" (in Windows 10/11) or "Command Prompt (Administrator)".
- If a User Account Control (UAC) prompt appears, click "Yes".
In the opened window, you will see a path like C:\Windows\system32>.
Step 2: Execute the TCP/IP Stack Reset Command
In the open terminal window, type the following command:
netsh int ip reset
Press Enter.
⚠️ Important: Do not close the terminal window immediately. Wait for the operation to complete. The command executes quickly (1-2 seconds) and finishes by returning to the command prompt without additional success messages. If you see an error "Administrator privileges required," it means you did not launch the terminal as an administrator.
What Does This Command Do?
It creates a backup of the current TCP/IP settings in the form of a resetlog.txt file (usually in the %SystemRoot%\Logging folder), and then overwrites two key system files:
%SystemRoot%\inf\nettcpip.inf— contains standard protocol parameters.- Registry entries related to
MS_TCPIPcomponents in theHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parametersbranch.
Thus, the stack returns to the "default" state for your version of Windows.
Step 3: Mandatory Computer Reboot
Changes to system files and the registry will only take effect after a reboot.
- Close the terminal window.
- Reboot the computer the standard way (Start -> Power button -> Restart).
- Wait for the system to fully load and log into your account.
💡 Tip: If you have a laptop, connect it to the network via an Ethernet cable during the reboot. This ensures that after startup, the system immediately obtains an IP via DHCP if the adapter settings are configured for it.
Step 4: Check Network Functionality
After rebooting, check the connection:
- Ensure the network icon in the notification area (bottom right) shows an active connection (usually a screen with two computers or a Wi-Fi icon without an exclamation mark).
- Open your browser and try to visit any site (e.g.,
google.com). - For a more precise diagnosis, open a terminal (you can use non-admin rights) and run:
ping 8.8.8.8
If you see replies like "Reply from 8.8.8.8...", then physical connectivity and routing are working. If the ping fails, the problem may be at the network adapter driver or hardware level. - If ping to an IP address works, but ping to a domain name (
ping google.com) fails, there may be a DNS issue. In this case, run:ipconfig /flushdns
Or configure public DNS servers in the network adapter properties (e.g.,8.8.8.8and8.8.4.4).
Checking the Result
A successful reset is indicated by:
- An active network connection (icon without warnings).
- A successful
pingto an external IP address (e.g.,8.8.8.8). - Internet access via the browser.
You can also verify that the stack was actually reset by checking the resetlog.txt log file. Open it via File Explorer by navigating to C:\Windows\Logging\ (or %SystemRoot%\Logging). It will list the registry keys that were restored.
Possible Issues
"Access denied" error when running netsh int ip reset
Cause: The terminal was not launched as an administrator. Solution: Close the current window, relaunch PowerShell or CMD via Win+X, and select the "administrator" option.
No IP address after reboot (Adapter status is "Unidentified network" or "Network not available")
Cause 1: The adapter is configured with a static IP, and DHCP settings were disabled after the reset.
Solution: Go to Control Panel -> Network and Internet -> Network and Sharing Center -> Change adapter settings. Right-click the relevant adapter -> "Properties" -> "Internet Protocol Version 4 (TCP/IPv4)" and set "Obtain an IP address automatically" and "Obtain DNS server address automatically". Click OK and restart the adapter (disable/enable).
Cause 2: The network adapter driver is corrupted or conflicting. Solution: Uninstall the adapter in Device Manager (check "Delete the driver software for this device"), then reboot the computer. Windows will reinstall the driver.
Problems persist after the reset
Cause: The corruption affects components other than TCP/IP (e.g., Winsock, drivers) or it is a hardware issue (faulty cable, malfunctioning router/modem). Solution: Perform the following guides sequentially:
- Winsock Reset (
netsh winsock reset+ reboot). - Update or reinstall the network adapter driver.
- Test network functionality on another device on the same network. If the problem exists there too, the issue is with the router/provider.
Alternative Methods
If for some reason the netsh int ip reset command did not help or you prefer a graphical interface, use the built-in "Network Reset" tool in Windows 10/11:
- Open Windows Settings (Win + I).
- Navigate to "Network & Internet" -> "Status".
- At the bottom, find the "Network reset" button and click it.
- Confirm the action. The computer will restart, and all network adapters will be reconfigured.
Note: This method is more "radical." It removes and reinstalls all network adapters (Ethernet, Wi-Fi, Bluetooth PAN) and resets settings to defaults. Afterward, you will need to reconnect to Wi-Fi networks and may need to reconfigure static IP/DNS settings.
For most cases involving TCP/IP corruption, the netsh int ip reset command described in this guide is sufficient.