How to Reset TCP/IP Stack in Windows 10

Internet works on TCP/IP protocol. If TCP/IP protocol stack is not working correctly in Windows 10 or any other Operating System like Linux or MacOS, you will have issues with your Internet connection. The best way to fix Internet issues is to reset TCP/IP stack settings.

This corruption in TCP/IP service stack can be caused due to various factors like installing software that changes network settings in Windows, viruses and malware, Windows Registry corruption etc.

There is no straight forward way to reset the internet protocols in Windows 10 . The TCP/IP internet protocol stores some networking data locally which can become corrupt.

If your Internet connection isn’t working properly and you’re getting “This site can’t be reached” although Windows is showing that you’re connected to the Internet.

Resetting TCP/IP stack is possible using Command Prompt in Windows. Let’s go through the process and make our Internet connection free from errors.

What is the TCP/IP protocol?

The Transmission Control Protocol/Internet Protocol is responsible for carrying packets from one source to its destination target. This protocol involves a three-way handshake, which means that three packets are exchanged between the source and the target before exchanging the actual information. This handshake is to establish trust between the two devices.

Repeating these handshakes repeatedly would increase traffic on the network significantly. Therefore, the data is cached and stored locally to avoid unnecessary packet transportation.

Moreover, the TCP/IP protocol works in a similar way to the OSI reference model. Meaning, it has its own set of rules and regulations which it establishes to communicate between devices. This is known as the stack. The TCP/IP cache refers to the stored data within a device which it uses to route the packets.

When and why you should reset the TCP/IP stack

Over time, Windows stores a cache of network data, including IP addresses. There are parameters in the System Registry as well that directly link to the internet protocol. At any point in time, these can become corrupted, which results in failure to connect to the internet, even though all other configurations are done right.

The corruption of the stack may even be a reason why your computer’s traffic is directed towards an old IP address and failed to update the new one in the cache.

Sometimes changing the IP address of your own computer, or simply restarting it is not sufficient. That is when a user must resort to this solution and reset their TCP/IP settings.

How to reset TCP/IP stack in Windows 10

As we mentioned earlier, Microsoft has not provided a simple way to reset the internet protocol. However, we can still do so with the help of the netsh command in the Command Prompt.

The netsh command can be used to view or configure the network settings in a Windows environment by providing the right parameters.

Note that this process will erase all current configurations of all the networking ports on your device, which also includes all inactive ones, as well as the virtual network adaptors. Hence, they will need to be reconfigured once the process is complete. Moreover, the operation also requires a system reboot, therefore it is advised to save your data before proceeding any further.

  1. Open Command Prompt with Administrative Privileges.
  2. Type ipconfig /release to remove current IP settings.
    release
  3. Type ipconfig /flushdns to remove DNS cache.
    flush
  4. Type netsh winsock reset to reset Windows Sockets API cache.
    winsock reset
  5. Type netsh int ip reset to reset TCP/IP stack cache. Do not restart the computer just yet.
    ip reset
  6. Type ipconfig /renew to request new IP settings from the server.
    renew
  7. Restart the computer.

If you want to automate the process, simply copy-paste the above-mentioned command in a text document, and save it with any name of your choice ending with .bat. This will create a batch file, which will execute all commands inside when you double-click it.

If you still can’t access the Internet, you can reset the Windows network settings completely.

TCP/IP is the soul of computer networking; access to the internet would not be possible without it. It is recommended to maintain your system’s networking cache and keep it optimized for better performance.

If you liked this post, Share it on:
Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).

2 comments

  • lgdoc

    wich command should we exactly copy/paste to automate the process?
    Thanks in advance
    Yours

    • Usman Khurshid
      A
      Usman Khurshid

      Create a .bat file and put the following in it:

      ipconfig /release
      ipconfig /flushdns
      netsh winsock reset
      netsh int ip reset
      ipconfig /renew

      When you run the batch file, these commands will be executed in sequence.

Leave your comment

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information