How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (2024)

The Internet is a pretty useful resource butsetting 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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (1)

Before you go ahead with resetting the TCP/IP stack, I would suggest you readthis 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.

SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\SYSTEM\CurrentControlSet\Services\DHCP\Parameters\

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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (2)

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

netsh intipreset

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (3)
There are chances that you might get “access is denied” error even if you are running the command as an administrator.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (4)

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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (5)

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.

HKEY_LOCAL_MACHINE/System/CurrentControlSet/Control/NSI.

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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (6)

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

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (7)

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

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (8)

Click on Apply and close the Registry Editor.

Now, go back to cmd, and run the previousnetsh intipreset command the result should be like the one I have below.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (9)

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 20140for 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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (10)

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

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (11)

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 desktopand click onOpen terminal.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (12)

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

sudo service network-manager restart

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (13)

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

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (14)

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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (15)

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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (16)

Enter the following commands respectively :

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

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (17)

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (18)

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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (19)

Under System Preferences choose “Network”.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (20)

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.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (21)

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

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (22)

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.

LinuxmacWindows

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (23)

Pratik

Pratik works as an In-house writer and video host at TechWiser. Former Programmer, Current writer. Loves tech in any form, quite optimistic about AI, data science and IoT. Talks extremely less but you betcha can geek out over anything on Twitter.

How to Reset TCP/IP in Windows, Linux, and macOS - TechWiser (2024)

FAQs

How to completely reset your TCP/IP settings? ›

Type “netsh int ip reset” and then hit the Enter key on your keyboard. Wait for the Command Prompt to run through the TCP/IP reset. Once it's complete, you'll need to restart your computer to finish.

How to reset TCP/IP settings in macOS? ›

To reset the TCP/IP stack, do the following
  1. Select Network.
  2. Click on Internet connection with status Connected. Then click Advanced button in the bottom left corner.
  3. Open TCP/IP tab and click Renew DHCP Lease. Press OK to complete the task.
  4. Restart Mac.

How do I reset all TCP connections? ›

How to reset TCP IP Stack in Windows 10
  1. Right click on the Start button then choose Search.
  2. In the search bar, type in cmd. From the results, right click on Command Prompt and select Run as Administrator. ...
  3. Type netsh int ip reset into the Command Prompt window. ...
  4. Reboot the PC upon completion.

How to reset IP configuration on network adapter and reset TCP IP stack settings reset wireless network adapter? ›

Resetting the network stack
  1. Type ipconfig /release and press Enter.
  2. Type ipconfig /flushdns and press Enter.
  3. Type ipconfig /renew and press Enter. (This will stall for a moment.)
  4. Type netsh int ip reset and press Enter. (Don't restart yet.)
  5. Type netsh winsock reset and press Enter.

What is the TCP reset process? ›

TCP reset is an abrupt closure of the session; it causes the resources allocated to the connection to be immediately released and all other information about the connection is erased. TCP reset is identified by the RESET flag in the TCP header set to 1.

How to reset IP windows? ›

The ipconfig command
  1. Go to "Start > Run" and type " cmd " (no quotes), then select "OK"
  2. Type " ipconfig /release " (no quotes) and press "Enter"
  3. Once the prompt returns, type " ipconfig /renew " (no quotes), then hit "Enter,"
  4. Finally, type " exit " (without quotes) then press "Enter" to close the window.

How to reset IP Linux? ›

Linux
  1. Enter the Terminal from the root account.
  2. Type ifconfig ethX down (X is the Ethernet adapter you are looking to release, usually eth0).
  3. Press Enter.

How do I reset my IP on my Mac? ›

On your Mac, choose Apple menu > System Settings, then click Network in the sidebar. (You may need to scroll down.) Click the network service that needs a renewed IP address on the right, then click Details. Click TCP/IP, then click Renew DHCP Lease.

How to change TCP IP settings? ›

To enable DHCP or change other TCP/IP settings
  1. Select Start , then select Settings > Network & Internet .
  2. Do one of the following: For a Wi-Fi network, select Wi-Fi > Manage known networks. ...
  3. Under IP assignment, select Edit.
  4. Under Edit IP settings, select Automatic (DHCP) or Manual. ...
  5. When you're done, select Save.

How to clear TCP connections in Linux? ›

Use tcpkill command to kill specified in-progress TCP connections. It is useful for libnids-based applications which require a full TCP 3-whs for TCB creation.

Who sends TCP reset? ›

TCP RST flag may be sent by either of the end (client/server) because of fatal error. So if you take example of TCP RST flag, client trying to connect server on port which is unavailable at that moment on the server. Now for successful connections without any issues from either of the end, you will see TCP-FIN flag.

How do I fix TCP IP problems? ›

Troubleshooting checklist
  1. Step 1: Capture a network diagram. ...
  2. Step 2: Networking traces. ...
  3. Step 3: Ping the computer's local IP address. ...
  4. Step 4: Troubleshoot error messages that occurs during the ping or telnet test. ...
  5. Step 5: Ping or Telnet to the default gateway. ...
  6. Step 6: Check issues that affects the specific destination node.
Dec 26, 2023

How do I reset my Windows network adapter? ›

Network reset removes any network adapters you have installed and the settings for them. After your PC restarts, any network adapters are reinstalled, and the settings for them are set to the defaults. Select Start > Settings > Network & internet > Advanced network settings > Network reset.

How do you reset your IP? ›

How to change your IP address manually
  1. Click the “Start” button.
  2. Click “Settings” > “Network & internet.”
  3. Click “Ethernet” or “Wi-Fi,” depending on the connection your device uses.
  4. Under IP assignment, click “Edit.”
  5. Select “Manual” and toggle “IPv4” on.
  6. Input a new IP address, and click “Save.”
Oct 28, 2023

What causes TCP connection reset? ›

That usually happens when the peer crashes, but can also happen with poorly-written applications or frameworks that don't shut their TCP connections down cleanly.

How do I completely reset my IP address? ›

Windows 10/11
  1. Press Windows and R key at the same time to open the Run box.
  2. Type CMD and press Enter.
  3. Type ipconfig/release in the Command Prompt window. Press the Enter key.
  4. Type ipconfig/renew. Press Enter.
  5. Type Exit and press Enter to close the window.

How do I reset or clear the TCP IP autoconfiguration address? ›

PROCEDURE
  1. To open a command prompt, click Start and then type cmd in the "Search programs and files" box.
  2. At the command prompt, type: netsh int ip reset C:\netsh. ...
  3. At the command prompt, type: netsh winsock reset Press Enter.
  4. Confirm that you receive the feedback commands indicating that the reset was successful.
Aug 29, 2022

How do I change my TCP IP settings? ›

To enable DHCP or change other TCP/IP settings
  1. Select Start , then select Settings > Network & Internet .
  2. Do one of the following: For a Wi-Fi network, select Wi-Fi > Manage known networks. ...
  3. Under IP assignment, select Edit.
  4. Under Edit IP settings, select Automatic (DHCP) or Manual. ...
  5. When you're done, select Save.

Top Articles
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 6197

Rating: 4.2 / 5 (43 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.