Skip to main content
Home/Blog/Automation/Reset Windows Network from the Command Line (2026)
Automation

Reset Windows Network from the Command Line (2026)

Fix broken connectivity fast: netsh winsock reset, reset the TCP/IP stack, flush DNS, and release/renew your IP from the command line. Full 2026 reset sequence for Windows 10, 11, and Server.

By InventiveHQ Team
Reset Windows Network from the Command Line (2026)

Need to fix broken connectivity from the command line? This guide walks through the full Windows network reset sequence — Winsock, the TCP/IP stack, DNS cache, and your DHCP lease — plus when a full reset beats a targeted fix.

Network Reset Command Builder

Build the Windows network reset commands — netsh winsock reset, netsh int ip reset, ipconfig flushdns, release and renew — with the correct sequence and reboot guidance.

Open the full Network Reset Command Builder
Loading interactive tool...

Verified June 2026 · tested on Windows 11 24H2, Windows 10 22H2 & Server 2022/2025


Quick Reference: Essential Commands

Open an elevated Command Prompt or PowerShell (right-click → Run as administrator) and run these in order. The whole sequence rebuilds the network stack from scratch:

# 1. Reset the Winsock catalog (LSPs, proxy hooks)
netsh winsock reset

# 2. Reset the TCP/IP stack to defaults
netsh int ip reset

# 3. Flush the DNS resolver cache
ipconfig /flushdns

# --- REBOOT NOW (steps 1 & 2 require a restart) ---

# 4. Drop the current DHCP lease, then request a new one
ipconfig /release
ipconfig /renew

Which reset do you need?

Jump to the section you need below. If you only have one problem, prefer the targeted command — you rarely need the whole sequence.


netsh winsock reset: Rebuild the Winsock Catalog

netsh winsock reset returns the Winsock catalog to its default state. Winsock is the Windows Sockets API layer that every network app uses; third-party software (VPN clients, antivirus, proxies) inserts Layered Service Providers (LSPs) into this catalog, and a botched uninstall can leave broken hooks that break all connectivity. This command strips them out.

Windows 10Windows 11Server 2016+Built in — no module⚠ Requires reboot

netsh winsock Switch Reference

CommandDescription
netsh winsock resetReset the entire Winsock catalog to defaults
netsh winsock reset catalogOlder alias for the same reset (still accepted)
netsh winsock show catalogList the current Winsock providers / installed LSPs
netsh winsock audit trailShow the history of installed and removed LSPs

netsh winsock Usage Examples

# Standard reset — the one you almost always want
netsh winsock reset

# Inspect the catalog before resetting (find rogue LSPs)
netsh winsock show catalog

# Review which LSPs were added/removed over time
netsh winsock audit

Warning: netsh winsock reset removes all third-party LSPs from the catalog. Software that depends on them — some VPNs, parental-control filters, or legacy security products — may stop working until reinstalled. After running it you must reboot before the change is fully applied. Windows prints "You must restart the computer in order to complete the reset."


netsh int ip reset: Reset the TCP/IP Stack

netsh int ip reset (long form netsh interface ip reset) rewrites the TCP/IP configuration registry keys back to their clean installation defaults. This is the command-line equivalent of removing and reinstalling the TCP/IP protocol: it clears corrupted stack parameters, stale static routes, and bad IP settings that survive a normal reboot.

Windows 10Windows 11Server 2016+Built in — no module⚠ Requires reboot

netsh int ip Switch Reference

CommandDescription
netsh int ip resetReset both IPv4 and IPv6 TCP/IP stacks to defaults
netsh int ip reset C:\resetlog.txtReset and write a log of every key changed
netsh interface ipv4 resetReset only the IPv4 stack
netsh interface ipv6 resetReset only the IPv6 stack

netsh int ip Usage Examples

# Reset the full TCP/IP stack (IPv4 + IPv6)
netsh int ip reset

# Reset and capture exactly what changed to a log file
netsh int ip reset C:\resetlog.txt

# Long form — identical behaviour
netsh interface ip reset

Warning: This command erases custom IP, DNS, gateway, and routing configuration and reverts the stack to defaults. Record any static IP addresses, DNS servers, or persistent routes beforehand — you will need to re-enter them. A reboot is required to complete the reset.

Note: On Windows 10/11 you may see Access is denied printed for one or two registry keys (such as Reset Tcpip\Parameters). This is expected on modern builds and does not mean the reset failed — the rest of the stack is still reset successfully.


ipconfig /flushdns: Clear the DNS Cache

ipconfig /flushdns empties the local DNS resolver cache. Windows caches every name it looks up; when a DNS record changes (or malware/an old cache entry points a hostname at the wrong IP), the stale entry can stick around until it expires. Flushing forces the next lookup to query your DNS server fresh.

Windows 10Windows 11Server 2016+Built in — no moduleNo reboot needed

ipconfig DNS Switch Reference

CommandDescription
ipconfig /flushdnsPurge the resolver cache
ipconfig /displaydnsShow the current contents of the resolver cache
ipconfig /registerdnsRefresh DHCP leases and re-register DNS names
Clear-DnsClientCachePowerShell equivalent of /flushdns

ipconfig DNS Usage Examples

# Flush the DNS resolver cache (Command Prompt or PowerShell)
ipconfig /flushdns

# See what is currently cached before flushing
ipconfig /displaydns

# Re-register this computer's DNS records and renew leases
ipconfig /registerdns

# PowerShell-native equivalent of /flushdns
Clear-DnsClientCache

# Inspect the cache the PowerShell way
Get-DnsClientCache

Tip: Flushing DNS is non-destructive and needs no reboot — it is the safest first thing to try when a single site or service resolves incorrectly. Clear-DnsClientCache and ipconfig /flushdns do exactly the same thing; use whichever shell you already have open.


ipconfig /release & /renew: Get a Fresh DHCP Lease

These two commands cycle your DHCP lease. ipconfig /release tells the DHCP server to reclaim the address currently assigned to the adapter, leaving it with no IP. ipconfig /renew then requests a brand-new lease. Run them as a pair to recover from a bad address, an APIPA 169.254.x.x self-assignment, or a DHCP server that handed out the wrong scope.

Windows 10Windows 11Server 2016+Built in — no moduleDHCP adapters only

ipconfig DHCP Switch Reference

CommandDescription
ipconfig /releaseRelease the IPv4 DHCP lease on all adapters
ipconfig /renewRequest a new IPv4 DHCP lease
ipconfig /release6Release the IPv6 DHCP lease
ipconfig /renew6Request a new IPv6 DHCP lease
ipconfig /release "Wi-Fi"Release the lease on one named adapter only
ipconfig /allShow full per-adapter config (lease, DNS, MAC)

ipconfig DHCP Usage Examples

# Drop and re-request the IPv4 lease on every adapter
ipconfig /release
ipconfig /renew

# Target a single adapter by name (use the name from ipconfig /all)
ipconfig /release "Ethernet"
ipconfig /renew "Ethernet"

# Cycle the IPv6 lease as well
ipconfig /release6
ipconfig /renew6

# Confirm the new lease, gateway, and DNS servers
ipconfig /all

Warning: ipconfig /release drops your IP address and will break any active connection — including the remote session you are using. Never run it on a remote/RDP machine unless you have out-of-band access, because the box may not come back on the same address.


netsh interface ipv4 / ipv6 reset: Per-Protocol Reset

When only one IP version is broken — a stuck IPv6 link-local address, or an IPv4 stack that picked up bad parameters — you can reset a single protocol instead of the whole stack. netsh int ip reset does both at once; these target one each.

Windows 10Windows 11Server 2016+Built in — no module⚠ Requires reboot

Per-Protocol Switch Reference

CommandDescription
netsh interface ipv4 resetReset the IPv4 stack to defaults
netsh interface ipv6 resetReset the IPv6 stack to defaults
netsh interface ipv4 show configShow current IPv4 config before resetting
netsh interface ipv6 show interfacesList IPv6 interfaces and their state

Per-Protocol Usage Examples

# Reset only IPv6 (e.g. stuck link-local / no IPv6 connectivity)
netsh interface ipv6 reset

# Reset only IPv4, leaving IPv6 untouched
netsh interface ipv4 reset

# Review IPv4 config before you wipe it
netsh interface ipv4 show config

Warning: Like the combined reset, each per-protocol reset reverts that stack to defaults and requires a reboot. Save any static addresses or DNS entries for that protocol first.


Troubleshooting: Common Network Reset Errors

Each row is deep-linkable — share a specific error with …#net-access-denied, and the row highlights on arrival.

Error / SymptomMeaningFix
Access is denied during netsh int ip resetA couple of TCP/IP registry keys are protected on Win10/11Expected behaviour — the reset still completes. Reboot and re-test
You must restart the computer…Winsock/IP reset is staged but not yet appliedFinish all resets, then reboot once at the end
The requested operation requires elevationPrompt is not running as AdministratorRe-open Command Prompt/PowerShell with Run as administrator
Address shows 169.254.x.xAPIPA — DHCP failed to hand out a leaseipconfig /release then /renew; check the DHCP server/cabling
unable to contact your DHCP server on /renewNo reachable DHCP server (link down, VLAN, or server offline)Verify physical link and the DHCP scope; reset the stack if the adapter is stuck
"No internet" persists after reset + rebootProblem is upstream (router, ISP, driver) not the stackUpdate the NIC driver, power-cycle the router, test another device
An app stops working after winsock resetIts LSP was removed from the catalogReinstall the affected VPN/security/proxy software

Full Reset vs. Targeted Fix: When to Use Each

A full Winsock + TCP/IP reset is powerful but broad — it reverts custom configuration and forces a reboot. Work from the least disruptive fix upward:

  • Name resolution is wrong (a site loads the old server) → ipconfig /flushdns only. No reboot.
  • Bad / missing IP address (169.254.x.x, wrong subnet) → ipconfig /release then /renew. No reboot.
  • One protocol misbehaving (IPv6 stuck, IPv4 fine) → netsh interface ipv6 reset (or ipv4). Reboot.
  • Persistent "limited connectivity", LSP/proxy corruption, leftover VPN hooks → full sequence: netsh winsock reset + netsh int ip reset + ipconfig /flushdns, then reboot, then release/renew.

If connectivity is still broken after the full reset and a reboot, the fault is almost always outside the stack — a NIC driver, the router, or the ISP. Resetting again will not help; update the driver and test a second device on the same network.


Version-Specific & Compatibility Notes

  • Windows 11 / 10: netsh, ipconfig, and Clear-DnsClientCache are identical across modern builds. The Access is denied message on a couple of registry keys during netsh int ip reset is normal on both and does not indicate failure.
  • Windows Server 2016–2025: Same commands. On a server with multiple NICs, prefer the per-adapter forms (ipconfig /release "Ethernet") so you do not drop management interfaces by accident.
  • Settings app "Network reset": Settings → Network & internet → Advanced → Network reset runs the equivalent of these commands plus removes and reinstalls every adapter and forgets saved Wi-Fi/VPN profiles. Use it only when the targeted commands fail.
  • PowerShell vs. Command Prompt: Every command here runs in both. ipconfig /flushdnsClear-DnsClientCache and ipconfig /displaydnsGet-DnsClientCache are interchangeable.
  • Always reboot once: After winsock reset, int ip reset, or a per-protocol reset, the change is staged in the registry and only applied on restart. Batch your resets and reboot a single time at the end.

Frequently Asked Questions

Find answers to common questions

Run the commands in this order from an elevated prompt: 'netsh winsock reset', then 'netsh int ip reset', then 'ipconfig /flushdns', then reboot. After the reboot, run 'ipconfig /release' and 'ipconfig /renew' to get a fresh DHCP lease. The winsock and IP resets only take full effect after a restart, so do not skip the reboot.

Yes. 'netsh winsock reset' rebuilds the Winsock catalog, but the change is not fully applied until the machine restarts. Windows even prints 'You must restart the computer in order to complete the reset.' Run any other resets you need first, then reboot once at the end rather than rebooting after every command.

'netsh int ip reset' rewrites the TCP/IP registry keys back to their installation defaults, clearing corrupted IP configuration, static routes, and bad stack parameters. It is the command-line equivalent of reinstalling TCP/IP. A reboot is required afterward. On Windows 10/11 you may see 'Access is denied' for a couple of registry keys — that is normal and the reset still succeeds.

Run 'ipconfig /flushdns' from Command Prompt or PowerShell. It clears the local DNS resolver cache so the next lookup queries your DNS server fresh — useful after a DNS record changes or when a site resolves to the wrong IP. In PowerShell you can also use 'Clear-DnsClientCache', which does the same thing. Neither command requires a reboot.

'ipconfig /release' tells the DHCP server to take back your current IP lease, leaving the adapter without an IP. 'ipconfig /renew' then requests a new lease. Run them as a pair: release first, renew second. They only affect adapters configured for DHCP — interfaces with a static IP are unaffected.

The TCP/IP and Winsock resets do not touch saved Wi-Fi profiles, but they do clear custom IP, DNS, proxy, and firewall-related stack settings. The Settings app 'Network reset' option is more aggressive: it removes and reinstalls every adapter and forgets saved networks and VPN clients. Use the targeted netsh commands when you want to preserve Wi-Fi profiles.

Use 'netsh interface ipv4 reset' to reset only the IPv4 stack and 'netsh interface ipv6 reset' for IPv6. 'netsh int ip reset' resets both at once. Resetting a single protocol is handy when only IPv6 is misbehaving (for example, a stuck link-local address) and you want to leave IPv4 alone. A reboot is still required.

Try targeted fixes first: flush DNS for name-resolution problems, release/renew for a bad DHCP lease, and check your adapter settings. Reserve the full Winsock + TCP/IP reset for persistent problems — 'limited connectivity', LSP/proxy corruption left by uninstalled VPN or security software, or 'no internet' that survives a reboot. The full reset is broad and requires a restart, so it is the last resort, not the first step.

Transform Your IT with Automation

Streamline operations, reduce manual tasks, and improve security with intelligent automation.