How to Reset TCP/IP in Windows, Linux, and macOS.
The internet is a pretty useful resource, but setting it up at home can be tricky. Even after you’ve finished setting up, there are times when you see the “Unable to connect to the Internet†screen more often. This is possible even with a healthy and working internet connection! The final solution to this problem is to reset the TCP / IP stack. Let’s see how to reset the TCP / IP stack for Windows, Ubuntu and macOS.
Before you start resetting your TCP / IP stack, I suggest you read this step-by-step guide to fix Wi-Fi. If none of these methods work, you can try resetting the TCP / IP stack. But before we start with the step-by-step process, you need to know what you are getting yourself into.
What is TCP / IP? What does a TCP / IP reset do?
TCP / IP is a set of rules that govern how your computer system connects to the Internet, and resetting it is like uninstalling and reinstalling the TCP / IP protocol. It resets all network settings on your local computer. So, if you have configured any static routes, manual DNS names or IP addresses, it will all be lost. We recommend that you do this as the last step before hiring a provider.
First, let’s start with how to reset TCP / IP on the most popular operating system.
1. Windows
When you reset the TCP / IP stack in Windows, it internally resets the following registry key entries. SYSTEM CurrentControlSet Services Tcpip Parameters SYSTEM CurrentControlSet Services DHCP Parameters
This can be done both through the command line and through the graphical interface. I will list both methods for you and they should work on almost all versions of Windows, starting with Windows XP.
Reset TCP / IP in Windows using command line
To get started, press the Windows key and type “command prompt” or “cmd” in the search bar. Right click it and select “Run as administrator”. Running as administrator is important because this command requires elevated permissions.
At the command prompt, enter the following command and press Enter netsh int ip reset.
There is a possibility that you may receive an “access denied” error even if you run the command as administrator.
The solution to this error is pretty simple and straightforward.
First, you need to open the “Registry Editor”. The Windows registry is the database where Windows and many programs store their configuration settings. You can easily change these settings using the Registry Editor.
To do this, go to the start menu and type “regedit”. Right click it and run as administrator.
The Registry Editor has a lot of entries and you need to follow the path below carefully or you will end up changing the wrong entry, which could ultimately affect your system. I recommend backing up your registry.
Then go to the next directory. If you are using Windows 10, you can simply copy and paste the following address into the address bar of the Registry Editor and press Enter.
HKEY_LOCAL_MACHINE / System / CurrentControlSet / Control / NSI …
Inside NSI, you will find the {eb004a00-9b1a-11d4-9123-0050047759bc} subfolder. The subfolder names in NSI are very similar, so make sure you open the correct folder.
Under it you will find a subfolder named “26”. Right click on it and select Permissions.
This is where you must give everyone full control rights. To do this, select “Everyone” and check the “Full Control” box.
Click Apply and close Registry Editor.
Now go back to cmd and run the previous command netsh int ip reset, the result should be like mine below.
This means that you reset TCP / IP and now you have to restart the machine. Hopefully this solves the problem and your internet should work.
Reset TCP / IP in Windows using GUI
If you are a little clumsy with the command line, you can achieve the same result through a GUI. Unfortunately, there is no direct way to do this, and in order to do this you will need to download Microsoft Easy Fix 20140. This tool is good because it is provided by Microsoft and is completely safe to use.
Once you’ve downloaded the file, run it. A dialog box will open with instructions on how to proceed. The steps are pretty simple and self-explanatory.
Once you’re done, the tool will automatically reset the TCP / IP settings for you, and finally, you need to reboot your system.
See also: How to change IP address in Windows
2. Ubuntu
If you have an Ubuntu operating system, resetting TCP / IP is quite easy.
Reset TCP / IP in Ubuntu using command line
At the command prompt, right-click anywhere on the desktop and select Open Terminal.
In the terminal, type the following command and press Enter. sudo service network-manager restart
Tip: If you are logged in as root, you can skip using sudo before any command.
Note: If you get any errors while executing the command, please make sure net-tools is installed on your system. Use the following command to install net-tools. sudo apt install net-tools
Reset TCP / IP in Ubuntu using GUI
To do the same in the GUI, click the network icon in the upper right corner. From the drop-down list, select Disable for wireless or wired depending on your settings.
These steps will reset TCP / IP as well as network settings and should do the necessary.
3. macOS
Reset TCP / IP on Mac using Terminal
We’re not sure if people still use the command line on Mac, and hence it’s very difficult to find it.
To open Command Prompt, press Command and Space. Enter terminal in the search bar and double-click Terminal. This should open the command line for you.
Enter the following commands accordingly: 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.
Reboot your system and the problem should be resolved.
Reset TCP / IP in Mac using GUI
To do the same in the graphical interface, go to the Apple icon in the upper right corner of the screen and select “System Preferences.”
In System Preferences select “Network”.
In the pop-up window, select Wi-Fi or Ethernet depending on your connection type. On the adjacent tab, click Advanced. This will open another dialog box.
Select the TCP / IP tab and click Renew DHCP Lease.
This frees up the current IP address of the system, and now the system will obtain a new IP address and routing information from the DHCP server. The old data will be overwritten.
Depending on the type of operating system you are running, these steps will reset the TCP / IP stack and network settings that should start the Internet. If your connection continues to drop, I recommend contacting your internet service provider. Ask them to physically test the connection as well as your local computer.
Also let me know in the comments if you have any difficulties with these steps.