How to Reset Winsock and the TCP/IP Stack in Windows 11 and 10: What the netsh Commands Do and When They Help

A plug-and-socket network connector surrounded by a circular reset arrow, linked by lines to three small network nodes.
Illustration of a network connector with a circular reset arrow linked to three network nodes

Last reviewed: November 25, 2026. Steps were compared with Microsoft documentation where a page could be opened; none was run on a real PC. The top picture is an illustration, not a screenshot.

You can reset Winsock and the TCP/IP stack with two netsh commands in an elevated window. A reset helps when the connection shows as connected, but pages, apps or DNS lookups keep failing. It will not fix a damaged cable, a failed adapter or a wrong Wi-Fi password.

Many network faults look alike. A page will not open, an app reports a socket error, and the network icon still says connected. This guide explains what Winsock and the TCP/IP stack are, when a reset is worth trying, and how to run the commands safely. If the error names an RPC server, read our guide to the RPC server is unavailable error instead.

Quick answer

Quick fix summary

  1. Winsock is the Windows interface apps use for network traffic, and the TCP/IP stack moves that data.
  2. Reset only when the connection shows as connected but pages, DNS or sockets keep failing.
  3. Run the look-only checks first: ping 127.0.0.1, an IP address, a name, and ipconfig /all.
  4. Then run ipconfig /release, ipconfig /renew and ipconfig /flushdns, and test again.
  5. If that fails, run netsh winsock reset and netsh int ip reset in an elevated window, then restart.
  6. Expect to re-enter a saved static IP address, and possibly some VPN or security software hooks.
  7. Use the Settings Network reset only when these commands do not help, because it is heavier.

In this guide

What Winsock and the TCP/IP stack are

Winsock, short for Windows Sockets, is the interface Windows apps use for network communication. Microsoft describes the netsh winsock command as managing this API, which is responsible for network communication between applications and network services. Browsers, mail programs and games all pass through it. Some software adds its own entries to the Winsock catalog.

The TCP/IP stack is the set of Windows components that handle IP addresses, routing and the TCP and UDP protocols. Its settings include the IP address, default gateway and DNS servers. On most home networks these settings are automatic. A static setting is typed in by hand and stays until someone changes it.

Think of Winsock as the doorway apps use, and the TCP/IP stack as the plumbing behind it. A broken or leftover entry in either place can leave the connection looking healthy while requests fail. A reset puts both back to a clean default state.

Symptoms where a reset can help

A reset is most worth trying when the symptoms point to the software layer, not the cable or the Wi-Fi link. The table lists common patterns. It is a guide to what to check, not a diagnosis. Our PC repair guides group fixes by symptom if none of these match.

SymptomCommon causeCan a reset help?
Pages will not load while Wi-Fi or Ethernet shows connectedName lookup or catalog problemSometimes
Repeated DNS or socket errors in appsStale name cache or catalog entriesOften worth trying
Problems started after removing VPN or security softwareLeftover network hooksOften
Problems after malware removalChanged network settingsPossibly, after a scan
No networks listed, or Wi-Fi drops after sleepAdapter, driver or power settingsNot the right tool

Patterns that point to the software layer

Pages that will not load while the connection shows connected are the classic case. Run the general no-internet routine in the Wi-Fi connected but no internet guide first. Come back here if those checks point to the software layer.

Repeated DNS or socket errors are the second pattern. Test one app at a time. If only one app fails, such as Remote Desktop, start with that app's own settings.

The third pattern follows removal of software. After a VPN client, security product or malware is removed, network hooks can remain. VPN errors have their own causes, so read the Windows 11 VPN not connecting guide if the VPN itself still fails.

Wi-Fi faults a reset will not fix

Wi-Fi that shows no networks, or drops after sleep, has causes in the adapter, driver or power settings. A winsock reset will not fix those. Use the Wi-Fi keeps disconnecting guide, the Wi-Fi not showing up guide or the Wi-Fi disconnects after sleep guide instead. If this PC shares a connection as a hotspot, see the mobile hotspot guide. A reset also does not fix shared printer errors such as 0x0000011b, which have their own checks.

Reset or not: a decision tree

Work through the questions in order. Stop at the first answer that sends you to another guide.

  • Can you ping 127.0.0.1?
    • No: the adapter or core networking software may be damaged. Do not reset yet. Read the stop list below.
    • Yes: go to the next question.
      • Can you ping an IP address such as 8.8.8.8?
        • No: the connection itself is failing. Check the Wi-Fi or cable first. For a wired link, use the Ethernet guide.
        • Yes: go to the next question.
          • Does a name such as www.microsoft.com ping?
            • No: this points to DNS. Run the release, renew and flushdns steps, then test again.
            • Yes: go to the next question.
              • Do pages or apps still fail after the checks?
                • Yes, and you have noted your settings: run the reset pair, restart and test again.
                • No: no reset is needed.

    Before you start: note your settings

    Before you start

    Save your current network details before you change anything. Open Command Prompt, run ipconfig /all, and copy the output into a text file or take a screenshot. Note any static IP address, subnet mask, default gateway and DNS server.

    Also make sure you have a way back. Confirm you know your sign-in password and save open work. If you want a restore point, check that one exists first, using the System Restore guide. Keep a copy of your files as described in the Windows backup guide.

    Do not run the release or reset steps over a remote session. They can drop the connection you are using.

    How to reset Winsock safely, step by step

    Run the steps in this order. Steps 1 and 2 are look-only checks or small refreshes. The reset pair in step 3 comes last. Run the reset commands only from a window opened as administrator.

    Step 1: Look-only checks

    Open Command Prompt from the Start menu. Run the four checks below one at a time, and read each result before the next.

    Run this command:

    ping 127.0.0.1

    You should see four replies from 127.0.0.1 with times in milliseconds. This tests the local stack, not your network.

    If this fails: missing replies mean the local networking software needs a closer look. Stop here and read the stop list. If airplane mode is stuck on, see how to fix airplane mode stuck on first.

    Run this command:

    ping 8.8.8.8

    You should see replies from an outside address. This tests the path to the internet by IP address, so DNS is not involved. A firewall can block ping, so read this result with the others.

    If this fails: if 127.0.0.1 works but this fails, the link to your router or the internet is the problem. Use the Ethernet or Wi-Fi guide instead of the reset.

    Run this command:

    ping www.microsoft.com

    You should see replies, and the first line shows an IP address for the name. This tests name lookup.

    If this fails: if the IP address ping works but the name ping fails, the problem is likely DNS. That supports the flushdns step below.

    Run this command:

    ipconfig /all

    You should see one block per adapter, with an IPv4 address, subnet mask, default gateway and DNS servers. Copy this block into your notes before you change anything else.

    If this fails: an adapter with no IPv4 address, or one starting 169.254, did not get a normal address. That points to the cable, Wi-Fi or DHCP side, so a reset will not fix it.

    Step 2: Release, renew and flush

    These three commands refresh the IP address and the DNS cache. Run them in this order. General guidance: expect the connection to drop for a few seconds.

    Run this command:

    ipconfig /release

    What it does: Microsoft's ipconfig reference says it sends a DHCPRELEASE message to the DHCP server and discards the IP address configuration for the adapters. It also says this parameter disables TCP/IP for adapters configured to obtain an IP address automatically, so the connection may drop until the renew step.

    General guidance: you should see no error message. The connection may drop until the next step.

    If this fails: read any error message and do not continue to the reset. Note the message and check the stop list.

    Run this command:

    ipconfig /renew

    What it does: Microsoft's reference says it renews the DHCP configuration for adapters that obtain an address automatically. It asks the network for a fresh address. Run it straight after the release.

    General guidance: an IPv4 address usually returns after a few seconds. Run ipconfig /all if you want to check it.

    If this fails: if no address comes back, the cable or Wi-Fi link may be the cause. Stop here and check the connection guides.

    Run this command:

    ipconfig /flushdns

    What it does: Microsoft's reference says it flushes and resets the contents of the DNS client resolver cache. This can discard negative cache entries, which are recorded failed lookups, as well as other entries added dynamically. The next lookup starts fresh.

    General guidance: you should see a short confirmation line. Then run the name check again.

    If this fails: if the name ping still fails, note your settings and go on to the reset pair.

    Step 3: The reset pair

    Before you start

    Open Command Prompt or Windows Terminal as administrator. Right-click the app in the Start menu, choose Run as administrator and accept the prompt. Stop here if you have not noted your static IP settings.

    Run this command first:

    netsh winsock reset

    What it does: Microsoft's netsh winsock reference says this command resets the Winsock catalog to a clean state by removing any custom LSPs (layered service providers) that may cause network problems. It does not affect Winsock Name Space Provider entries.

    General guidance: you may see a short confirmation. A restart is a good idea afterwards, so plan for one. The Microsoft page does not state whether a restart is needed.

    If this fails: an access denied message can mean the window is not elevated. Close it, reopen as administrator and run the command again.

    Run this command second:

    netsh int ip reset

    What it does: General guidance: this command resets the TCP/IP configuration to its defaults, so an adapter with a typed-in address returns to automatic settings. The Microsoft page for this command could not be opened for this review, so check its current text before you rely on these details.

    General guidance: you may see a line for each setting it resets, then a restart message. Keep the window open until it finishes.

    If this fails: note the error and do not run the command again. Restart, then read the stop list before trying anything else.

    Step 4: Restart

    Restart the PC from the Start menu. General guidance: a restart is needed to load the reset settings fully, so do not skip it.

    You should see the sign-in screen after the restart. Sign in as usual.

    If this fails: if the PC does not restart, save your work and restart again from the Start menu. Do not run the reset commands a second time.

    Step 5: Test again

    Run the checks from step 1 in the same order. Then open the browser and the app that failed earlier.

    You should see the same replies as before, and the page or app should load. Compare the results with your notes from the first run.

    If this fails: note the exact error and the result of each ping. Do not run the reset again. Use the stop list to decide the next step.

    What you will lose

    A reset changes settings, so know what may need redoing.

    • Saved static IP settings. Any address, gateway or DNS server you typed in may need re-entering from your note.
    • Some VPN or virtual adapter hooks. A VPN client or virtual adapter may need reinstalling or reconfiguring.
    • Some firewall software hooks. A security product that adds network hooks may need repair from its own settings. Do not disable the firewall to test this.
    • Catalog entries added by other software. That software may need reinstalling or setting up again.

    Wi-Fi passwords are not removed by these two commands, to our understanding. We have not confirmed this on a Microsoft page, so check your saved networks after the restart.

    Network reset or these commands

    Settings also has a heavier option called Network reset. The Microsoft Support article for it could not be opened for this review, so the points below are general guidance.

    SettingsNetwork & internetAdvanced network settingsNetwork reset

    OptionWhereUse it when
    netsh winsock reset and netsh int ip resetElevated Command Prompt or Windows TerminalThe checks point to the software layer and your settings are noted
    Network resetSettings, Network and internet, Advanced network settingsThe commands did not help and you accept reinstalling network software

    General guidance: Network reset removes and reinstalls network adapters, may remove VPN and virtual adapters, and usually asks for a restart. Keep your Wi-Fi password and VPN details ready before you use it.

    When to stop and get help

    Some results mean a reset will not solve the problem. Stop and get help in these cases.

    • Ping 127.0.0.1 fails. The local networking software or the adapter may be damaged.
    • No IPv4 address returns after release and renew, or an address starting 169.254 stays.
    • The reset commands report an error, or you cannot open an elevated window.
    • The same error remains after the restart and the retest.
    • You suspect malware or damaged system files. If system files look damaged, run DISM /Online /Cleanup-Image /RestoreHealth first, then sfc /scannow, as covered in how to repair Windows system files with SFC and DISM.
    • Windows Update errors continue alongside the network fault. Those are a separate problem, covered in how to fix Windows Update stuck or failing.
    • The PC is a work or school device. Network policies may block these changes, so ask your administrator first.

    If you are unsure which path fits, the Repair Assistant can help you narrow down the symptom before you change anything else.

    Windows 10 note

    Windows 10 reached end of support on October 14, 2025. Consumer Extended Security Updates run until October 12, 2027, as Microsoft's ESU page explains. Menus can differ on Windows 10, so the path names may not match your screen. The Microsoft Learn pages for netsh winsock and ipconfig list both Windows 10 and Windows 11 under Applies to.

    Frequently asked questions

    About the reset

    Is a Winsock reset the same as a Network reset?

    No. A Winsock reset is two netsh commands followed by a restart. Network reset is in Settings and is heavier. General guidance: it removes and reinstalls network adapters, so VPN and virtual adapters may need setting up again. Try the commands first, and use the Settings option only when they fail and you accept that reinstall.

    Will resetting Winsock delete my Wi-Fi passwords?

    To our understanding, no. The netsh winsock Microsoft page does not mention Wi-Fi passwords, and the netsh int ip page could not be opened, so we have not confirmed this on a Microsoft page. Write your Wi-Fi password down before you start, as a precaution. After the restart, check that your saved networks are still listed.

    Do I need to run the commands as administrator?

    General guidance: yes. Right-click Command Prompt or Windows Terminal in the Start menu, choose Run as administrator and accept the prompt. Check the window title before you type. If the window is not elevated, the reset commands can fail with an access denied message. Close the window, reopen it as administrator and run the command again.

    Can a reset fix Wi-Fi that shows no networks?

    Usually not. Wi-Fi that shows no networks usually comes from the adapter, its driver or Wi-Fi settings. A Winsock reset targets the software layer that apps use to reach the network. Use the Wi-Fi guide for that symptom instead. Keep the reset for pages and apps that fail while the connection shows connected.

    Before and after the reset

    Do I need to restart after the reset?

    Yes. General guidance: restart after both netsh commands, even if they seem to finish. The reset is usually applied fully only after a restart. Afterwards, run the ping and name checks again, then test the app that failed. Compare the results with the notes from your first run.

    What if pages still fail after the reset?

    Read your first results again and check the stop list. Test a second app or website to see whether the fault is limited. If the connection itself drops, the cause is likely outside Winsock. Stop and get help if the same error stays after a restart and a retest.

    Will a reset remove my VPN?

    It can. A VPN client or virtual adapter may need reinstalling or reconfiguring after the reset. Check the VPN client after the restart and keep its settings ready. Some VPN errors have other causes that a reset does not touch, so check the error code before you change anything else.

    Does a Winsock reset help after malware removal?

    It can clear network changes that malware or older software left behind. It does not remove malware. Scan the PC with security software you already trust first. Then check the ping and name results. Run the reset only if the network path still fails after the scan.

    How this guide was checked

    This guide was written from Microsoft Learn reference pages for netsh winsock and ipconfig, and from Microsoft's page on the Windows 10 Extended Security Updates program. The Microsoft pages for netsh int ip and Network reset could not be opened during this review, so those points are labelled general guidance. No step was run on a real PC. Check each command against your own Windows version before you run it.

    Sources