How to Reset TCP/IP in Windows, Linux, and macOS

The Internet is a pretty useful resource but setting it up at your home can be a tricky job. Even after you have finished the set-up, there are times when you end up seeing “Unable to connect to the Internet” screen more often than not. It is possible even if you have a healthy and working Internet connection! The last way to solve this problem is by resetting the TCP/IP stack. Let’s see how to reset TCP/IP stack for Windows, Ubuntu & macOS.

Before you go ahead with resetting the TCP/IP stack, I would suggest you read this step by step guide to fix WiFi. If none of these methods seem to work, you can try resetting the TCP/IP stack. But before we begin with the step-by-step process, you need to be aware of what you are getting into.

What is TCP/IP? What does resetting the TCP/IP do?

TCP/IP is the set of rules which governs the connection of your computer system to the Internet and resetting it is the same as removing and reinstalling the TCP/IP protocol. It resets all the network settings on your local machine. So, if you have configured any static routes, manual DNS names or IP addresses, it would all be lost. We recommend that this should be the last step to try before you engage the ISP guy.

Firstly, let’s start with how to reset TCP/IP on the most popular operating system.

1. Windows

When you reset TCP/IP stack in Windows, it internally resets the following registry keys entries.


This can be done through command line as well as GUI. I will list out both the methods for you and this should work on almost all versions of Windows starting with Windows XP.

Reset TCP/IP in Windows with Command Line

To get started, press the Windows key and type “command prompt” or “cmd” in the search bar. Right click on it and select “Run as administrator”. Running as administrator is important because this command needs elevated permissions.

On the command prompt, type the following command and hit Enter

netsh int ip reset

There are chances that you might get “access is denied” error even if you are running the command as an administrator.

The solution to this error is pretty easy and straightforward.

Firstly, you will have to open “Registry Editor”. Windows Registry is a  database where Windows and many programs store their configuration settings. You can easily edit those settings with Registry Editor.

To do that, head on to the Start menu and type “regedit”. Right click on it and Run as Administrator.


There are tons of entries in Registry Editor and you need to carefully follow the below-mentioned path else you will end up changing the wrong entry which could eventually impact your system functions. I recommend backing up the registry.

With that out of the way, navigate to the following directory. If you are on Windows 10, you can just copy-paste the following address into the Registry Editor’s address bar and press Enter.


Within NSI you will find the sub-folder {eb004a00-9b1a-11d4-9123-0050047759bc}. The name of the sub-folders under NSI are pretty similar so make sure you open the right folder.


Under that, you will find a sub-folder named “26“. Right click on it and select Permissions.

Here you have to provide full control permissions to Everyone. To do that select Everyone and check the checkbox beside Full Control.

Click on Apply and close the Registry Editor.

Now, go back to cmd, and run the previous netsh int ip reset command the result should be like the one I have below.

This means that you have reset TCP/IP and now you will have to restart the machine. Hopefully this will fix the problem and your Internet should be up and running.

Reset TCP/IP in Windows with GUI

If you are a bit clumsy with the command line, you can achieve the same result through GUI. Sadly, there is no direct way to do it and you will have to download the Microsoft Easy Fix 20140 for it. The good thing about the tool is that it is provided by Microsoft and perfectly safe to use.

After you have downloaded the file, run it. This will open a dialogue box and it will instruct you about the further steps. The steps are quite simple and self-explanatory.

Once you finish, the tool will automatically reset TCP/IP settings for you and finally, you need to restart your system.

Also: How To Change IP Address in Windows

2. Ubuntu

If you have a Ubuntu Operating system, resetting TCP/IP is pretty easy.

Reset TCP/IP in Ubuntu with Command Line

For Command line, Right click anywhere on the desktop and click on Open terminal.

On the terminal, type the following command and hit Enter.

sudo service network-manager restart

Tip: If you are directly logged in as the root user you can skip using sudo before any command.

Note: If you get any errors for the command, ensure that you have net-tools installed on your system. To install net-tools use the following command.

sudo apt install net-tools

Reset TCP/IP in Ubuntu with GUI

To do the same on GUI, click on the network symbol at the top right corner. From the drop-down select Turn off for Wireless Network or Wired Network depending on your setup.

These steps will reset TCP/IP as well as network settings and should do the needful.

3. macOS

Reset TCP/IP in Mac with Terminal

We are not sure if people still use command line on Mac and hence it is very difficult to find it.

To open the command line, press Command, and Space. Type terminal on the search bar and double-click on Terminal. This should open the command line for you.

Enter the following commands respectively :

sudo networksetup -setv4off Wi-Fi
sudo networksetup -setdhcp Wi-Fi

Tip: If you are connected to a wired network use Ethernet instead of Wi-Fi in the command.

Restart your system and the issue should be fixed.

Reset TCP/IP in Mac with GUI

To do the same from GUI, head over to the Apple icon at the top right corner of your screen and choose System Preferences.

Under System Preferences choose “Network”.

From the pop-up select Wi-Fi or Ethernet depending on the type of connection you have. From the adjacent tab, click on Advanced. This will open another dialogue box.

Select the TCP/IP tab and click on “Renew DHCP Lease“.

This releases the current IP address of the system and the system will now retrieve the new IP address and routing data from the DHCP server. The old data will be overridden.

Depending upon the type of Operating system you are working with, these steps will reset the TCP/IP stack and the network settings which should get the Internet up and running. In case, you are still stuck with a broken connection, I recommend engaging your Internet Service Provider. Ask them to physically inspect the connection as well as your local machine.

Do also let me know in the comments if you are facing any difficulties with these steps.

Related posts

4 Ways to Use Chromebook as Second Monitor (Free and Paid)

6 Best Alfred App Alternatives for Windows to Be More Productive

How to Make Windows Look Like macOS: Customize Window Desktop